Skip to content

HDI: add warning to ASM cmdlets #813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public abstract class AzureHDInsightCmdlet : AzurePSCmdlet

private ILogWriter logger;


/// <summary>
/// Gets or sets a value indicating whether logging should be enabled.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,8 @@ internal class AzureHdInsightPowerShellConstants
public const string Show = "Show";
public const string Skip = "Skip";
public const string ToDateTime = "To";

public const string AsmWarning =
"WARNING: The Azure Service Management (ASM) cmdlets for HDInsight are deprecated and will be non-default in a future release, and they will be removed soon thereafter. Please use Switch-AzureMode AzureResourceManager to use the Azure Resource Manager cmdlets for HDInsight.";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
this.command.Logger = this.Logger;
Task task = this.command.EndProcessing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ protected override void EndProcessing()
{
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
this.command.Logger = this.Logger;
Task task = this.command.EndProcessing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public string TaskLogsDirectory
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Logger = this.Logger;
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
this.AssertTaskLogsDirectorySpecified(this.TaskLogsDirectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Logger = this.Logger;
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Enable = true;
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Enable = true;
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ protected override void EndProcessing()
this.command.Connection = currentConnection;
try
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Logger = this.Logger;
this.command.CurrentSubscription = this.GetCurrentSubscription(string.Empty, null);
Task task = this.command.EndProcessing();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ protected override void BeginProcessing()
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
DateTime start = DateTime.Now;
string msg = string.Format(CultureInfo.CurrentCulture, "Create Cluster Started : {0}", start.ToString(CultureInfo.CurrentCulture));
this.Logger.Log(Severity.Informational, Verbosity.Detailed, msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public string ZookeeperNodeVMSize
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public string StatusFolder
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
if (this.File.IsNullOrEmpty() && this.Query.IsNullOrEmpty())
{
throw new PSArgumentException("Either File or Query should be specified for Hive jobs.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public string StatusFolder
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightMapReduceJobDefinition output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public string StatusFolder
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
if (this.File.IsNullOrEmpty() && this.Query.IsNullOrEmpty())
{
throw new PSArgumentException("Either File or Query should be specified for Pig jobs.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public string StatusFolder
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
if (this.File.IsNullOrEmpty() && this.Command.IsNullOrEmpty())
{
throw new PSArgumentException("Either File or Command should be specified for Sqoop jobs.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public string StatusFolder
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightStreamingMapReduceJobDefinition output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
try
{
this.command.CurrentSubscription = this.GetCurrentSubscription(this.Subscription, this.Certificate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Enable = false;
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.Enable = false;
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public SetAzureHDInsightClusterSizeCmdlet()

protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
if (Cluster != null)
{
Name = Cluster.Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public string StorageContainerName
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
this.command.EndProcessing().Wait();
foreach (AzureHDInsightConfig output in this.command.Output)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public string Subscription
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
try
{
this.command.Logger = this.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public string Subscription
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
try
{
this.command.Logger = this.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public string Subscription
/// </summary>
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
try
{
this.command.Logger = this.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ public double WaitTimeoutInSeconds
/// <inheritdoc />
protected override void EndProcessing()
{
this.WriteWarning(AzureHdInsightPowerShellConstants.AsmWarning);
try
{
this.command.Logger = this.Logger;
Expand Down