Skip to content

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

Merged
merged 9 commits into from
Dec 8, 2016
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 @@ -62,14 +62,13 @@
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.0.12.6-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.1.0.1-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.0.12.8-preview\lib\net45\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.1.0.2-preview\lib\net45\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down

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
Expand Up @@ -5,8 +5,8 @@
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="0.12.6-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.DataLake.Store" version="0.12.8-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="1.0.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.DataLake.Store" version="1.0.2-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.ResourceManager" version="1.1.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=0.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.0.12.6-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.1.0.1-preview\lib\net45\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -138,6 +138,12 @@
<Compile Include="Commands\NewAzureRmDataLakeAnalyticsAccount.cs" />
<Compile Include="Commands\RemoveAzureRmDataLakeAnalyticsAccount.cs" />
<Compile Include="Commands\SetAzureRmDataLakeAnalyticsAccount.cs" />
<Compile Include="Models\PSDataLakeStoreAccountInfo.cs" />
<Compile Include="Models\PSStorageAccountInfo.cs" />
<Compile Include="Models\PSStorageAccountInfoProperties.cs" />
<Compile Include="Models\PSDataLakeStoreAccountInfoProperties.cs" />
<Compile Include="Models\PSDataLakeAnalyticsAccountProperties.cs" />
<Compile Include="Models\PSDataLakeAnalyticsAccount.cs" />
<Compile Include="Models\ObsoleteUSqlCredential.cs" />
<Compile Include="Models\AdlDataSource.cs" />
<Compile Include="Models\CatalogPathInstance.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ public class AddAzureDataLakeAnalyticsDataSource : DataLakeAnalyticsCmdletBase
[ValidateNotNullOrEmpty]
public string AccessKey { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Position = 2, Mandatory = false,
ParameterSetName = DataLakeParameterSetName,
HelpMessage =
"Optionally indicates that this should now be the default storage account for the DataLakeAnalytics account."
)]
[ValidateNotNullOrEmpty]
public SwitchParameter Default { get; set; }

[Parameter(ValueFromPipelineByPropertyName = true, Position = 3, Mandatory = false,
ParameterSetName = DataLakeParameterSetName,
HelpMessage =
Expand All @@ -79,10 +71,8 @@ public override void ExecuteCmdlet()
var toAdd = new StorageAccountInfo
{
Name = Blob,
Properties = new StorageAccountProperties
{
AccessKey = AccessKey
}
AccessKey = AccessKey

};

DataLakeAnalyticsClient.AddStorageAccount(ResourceGroupName, Account, toAdd);
Expand All @@ -91,16 +81,10 @@ public override void ExecuteCmdlet()
{
var toAdd = new DataLakeStoreAccountInfo
{
Name = DataLakeStore,
Properties = new DataLakeStoreAccountInfoProperties()
Name = DataLakeStore
};

DataLakeAnalyticsClient.AddDataLakeStoreAccount(ResourceGroupName, Account, toAdd);

if (Default)
{
DataLakeAnalyticsClient.SetDefaultDataLakeStoreAccount(ResourceGroupName, Account, toAdd);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
using Microsoft.Azure.Commands.DataLakeAnalytics.Models;
using Microsoft.Azure.Management.DataLake.Analytics.Models;
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;

namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsAccount", DefaultParameterSetName = BaseParameterSetName),
OutputType(typeof(List<DataLakeAnalyticsAccount>), typeof(DataLakeAnalyticsAccount))]
OutputType(typeof(List<DataLakeAnalyticsAccount>), typeof(PSDataLakeAnalyticsAccount))]
[Alias("Get-AdlAnalyticsAccount")]
public class GetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
{
Expand All @@ -46,13 +47,14 @@ public override void ExecuteCmdlet()
if (!string.IsNullOrEmpty(Name))
{
// Get for single account
WriteObject(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name));
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name)));
}
else
{
// List all accounts in given resource group if avaliable otherwise all accounts in the subscription
var list = DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null);
WriteObject(list, true);
WriteObject(DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null)
.Select(element => new PSDataLakeAnalyticsAccount(element))
.ToList(), true);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsDataSource", DefaultParameterSetName = ListStorageParameterSetName), OutputType(typeof(StorageAccountInfo), typeof(DataLakeStoreAccountInfo), typeof(IEnumerable<AdlDataSource>))]
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsDataSource", DefaultParameterSetName = ListStorageParameterSetName), OutputType(typeof(PSStorageAccountInfo), typeof(PSDataLakeStoreAccountInfo), typeof(IEnumerable<AdlDataSource>))]
[Alias("Get-AdlAnalyticsDataSource")]
public class GetAzureDataLakeAnalyticsDataSource : DataLakeAnalyticsCmdletBase
{
Expand Down Expand Up @@ -70,11 +70,11 @@ public override void ExecuteCmdlet()
{
if (ParameterSetName.Equals(BlobParameterSetName, StringComparison.InvariantCultureIgnoreCase))
{
WriteObject(DataLakeAnalyticsClient.GetStorageAccount(ResourceGroupName, Account, Blob));
WriteObject(new PSStorageAccountInfo(DataLakeAnalyticsClient.GetStorageAccount(ResourceGroupName, Account, Blob)));
}
else if ((ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase)))
{
WriteObject(DataLakeAnalyticsClient.GetDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore));
WriteObject(new PSDataLakeStoreAccountInfo(DataLakeAnalyticsClient.GetDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore)));
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Microsoft.Azure.Commands.DataLakeAnalytics
{
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(DataLakeAnalyticsAccount))]
[Cmdlet(VerbsCommon.New, "AzureRmDataLakeAnalyticsAccount"), OutputType(typeof(PSDataLakeAnalyticsAccount))]
[Alias("New-AdlAnalyticsAccount")]
public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
{
Expand Down Expand Up @@ -54,6 +54,24 @@ public class NewAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
[ValidateNotNull]
public Hashtable Tags { 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()
{
try
Expand Down Expand Up @@ -87,8 +105,8 @@ public override void ExecuteCmdlet()
Name = DefaultDataLakeStore
};

WriteObject(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, Location, defaultStorage,
customTags: Tags));
WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.CreateOrUpdateAccount(ResourceGroupName, Name, Location, defaultStorage,
customTags: Tags, maxDegreeOfParallelism: MaxDegreeOfParallelism, maxJobCount: MaxJobCount, queryStoreRetention: QueryStoreRetention)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public override void ExecuteCmdlet()

var toUse = Uri ?? new Uri(string.Format("https://{0}:{1}", DatabaseHost, Port));

WriteObject(DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName,
Secret.GetNetworkCredential().Password, toUse.AbsoluteUri));
DataLakeAnalyticsClient.CreateSecret(Account, DatabaseName, Secret.UserName,
Copy link
Member

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?

Copy link
Contributor Author

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.

Secret.GetNetworkCredential().Password, toUse.AbsoluteUri);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@begoldsm why is this parameter being remove? This is a breaking change

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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,
Copy link
Member

Choose a reason for hiding this comment

The 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)));
}
}
}
Loading