-
Notifications
You must be signed in to change notification settings - Fork 4k
ADL Updates to use latest GA packages. #3261
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
Changes from all commits
99907de
9ca9464
e8186fb
1ed6096
e80f80d
d254419
09b1f32
dbbcf92
d0d1e49
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
|
||
namespace Microsoft.Azure.Commands.DataLakeAnalytics | ||
{ | ||
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))] | ||
[Cmdlet(VerbsCommon.Set, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(PSDataLakeAnalyticsAccount))] | ||
[Alias("Set-AdlAnalyticsAccount")] | ||
public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase | ||
{ | ||
|
@@ -29,36 +29,39 @@ public class SetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase | |
public string Name { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 1, Mandatory = false, | ||
HelpMessage = | ||
"Name of the new Data Lake account to set as the default storage for this DataLakeAnalytics account.")] | ||
[ValidateNotNullOrEmpty] | ||
public string DefaultDataLakeStore { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false, | ||
HelpMessage = | ||
"A string,string dictionary of tags associated with this account that should replace the current set of tags" | ||
)] | ||
[ValidateNotNull] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @begoldsm why is this parameter being remove? This is a breaking change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was never supported. Same comment as above. We were lucky no one tried to use this option, since it would have always resulted in an exception from the server saying "changes to default store are not allowed" |
||
public Hashtable Tags { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = false, | ||
[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @begoldsm same comment about too many positional parameters |
||
HelpMessage = "Name of resource group under which you want to update the account.")] | ||
[ValidateNotNullOrEmpty] | ||
public string ResourceGroupName { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, | ||
HelpMessage = "The maximum supported degree of parallelism for this account.")] | ||
[ValidateNotNull] | ||
[ValidateRange(1, int.MaxValue)] | ||
public int? MaxDegreeOfParallelism { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, | ||
HelpMessage = "The maximum supported jobs running under the account at the same time.")] | ||
[ValidateNotNull] | ||
[ValidateRange(1, int.MaxValue)] | ||
public int? MaxJobCount { get; set; } | ||
|
||
[Parameter(ValueFromPipelineByPropertyName = true, Mandatory = false, | ||
HelpMessage = "The number of days that job metadata is retained.")] | ||
[ValidateNotNull] | ||
[ValidateRange(1, 180)] | ||
public int? QueryStoreRetention { get; set; } | ||
|
||
public override void ExecuteCmdlet() | ||
{ | ||
DataLakeStoreAccountInfo defaultAccount = null; | ||
if (!string.IsNullOrEmpty(DefaultDataLakeStore)) | ||
{ | ||
defaultAccount = new DataLakeStoreAccountInfo | ||
{ | ||
Name = DefaultDataLakeStore | ||
}; | ||
} | ||
|
||
WriteObject(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, null, defaultAccount, | ||
null, null, Tags)); | ||
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, null, null, | ||
null, null, Tags, MaxDegreeOfParallelism, MaxJobCount, QueryStoreRetention))); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@begoldsm this cmdlet won't return anything anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It never returned anything. The object would be null/empty since the service has never returned anything. This was detected during the time spent adding more robust test support across our service.