Skip to content

Commit e61ff71

Browse files
committed
Ben's object changes
[ADLA] * Changed one of the two OutputTypes of Get-AzureRmDataLakeAnalyticsAccount - List<DataLakeAnalyticsAccount> to List<PSDataLakeAnalyticsAccountBasic> - The properties of PSDataLakeAnalyticsAccountBasic is a strict subset of the properties of DataLakeAnalyticsAccount - The additional properties that are in DataLakeAnalyticsAccount are not returned by the service. Therefore, this change is to reflect this accurately. * Changed one of the two OutputTypes of Get-AzureRmDataLakeAnalyticsJob - List<JobInformation> to List<PSJobInformationBasic> - The properties of PSJobInformationBasic is a strict subset of the properties of JobInformation - The additional properties that are in JobInformation are not returned by the service. Therefore, this change is to reflect this accurately. * Updated the cmdlet logic of Submit-AzureRmDataLakeAnalyticsJob because SubmitJob and BuildJob now require an explicit parameter object rather than the generic JobInformation object * Removed the Obsolete Properties fields in PSDataLakeAnalyticsAccount.cs and its assoicated files [ADLS] * Changed one of the two OutputTypes of Get-AzureRmDataLakeStoreAccount - List<PSDataLakeStoreAccount> to List<PSDataLakeStoreAccountBasic> - The properties of PSDataLakeStoreAccountBasic is a strict subset of the properties of PSDataLakeStoreAccount - The additional properties that are in PSDataLakeStoreAccount are not returned by the service. Therefore, this change is to reflect this accurately. * Removed the Obsolete Properties fields in PSDataLakeStoreAccount.cs and its assoicated files
1 parent 28a470e commit e61ff71

30 files changed

+612
-454
lines changed

src/ResourceManager/DataLakeAnalytics/ChangeLog.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Changed one of the two OutputTypes of Get-AzureRmDataLakeAnalyticsAccount
22+
- List<DataLakeAnalyticsAccount> to List<PSDataLakeAnalyticsAccountBasic>
23+
- The properties of PSDataLakeAnalyticsAccountBasic is a strict subset of the properties of DataLakeAnalyticsAccount
24+
- The additional properties that are in DataLakeAnalyticsAccount are not returned by the service. Therefore, this change is to reflect this accurately.
25+
* Changed one of the two OutputTypes of Get-AzureRmDataLakeAnalyticsJob
26+
- List<JobInformation> to List<PSJobInformationBasic>
27+
- The properties of PSJobInformationBasic is a strict subset of the properties of JobInformation
28+
- The additional properties that are in JobInformation are not returned by the service. Therefore, this change is to reflect this accurately.
29+
* Updated the cmdlet logic of Submit-AzureRmDataLakeAnalyticsJob because SubmitJob and BuildJob now require an explicit parameter object rather than the generic JobInformation object
30+
* Removed the Obsolete Properties fields in PSDataLakeAnalyticsAccount.cs and its assoicated files
2131

2232
## Version 3.4.0
2333

@@ -93,4 +103,4 @@
93103
- Better error messaging and support for invalid input
94104
* General help improvements
95105
- Clearer help for job operations
96-
- Fixed typos and incorrect examples
106+
- Fixed typos and incorrect examples

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@
6464
</Reference>
6565
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6666
<SpecificVersion>False</SpecificVersion>
67-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.3.0.0\lib\net452\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
67+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.3.1.2-preview\lib\net452\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.DataLake.Store, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<SpecificVersion>False</SpecificVersion>
72-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.2.2.0\lib\net452\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
70+
<Reference Include="Microsoft.Azure.Management.DataLake.Store">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Store.2.3.0-preview\lib\net452\Microsoft.Azure.Management.DataLake.Store.dll</HintPath>
7372
<Private>True</Private>
7473
</Reference>
7574
<Reference Include="Microsoft.Azure.Management.ResourceManager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -104,12 +103,12 @@
104103
</Reference>
105104
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
106105
<SpecificVersion>False</SpecificVersion>
107-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
106+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
108107
<Private>True</Private>
109108
</Reference>
110109
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
111110
<SpecificVersion>False</SpecificVersion>
112-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
111+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.10\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
113112
<Private>True</Private>
114113
</Reference>
115114
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaAliasTests.ps1

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function Test-DataLakeAnalyticsJobRelationships
4242
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
4343
}
4444

45+
# Wait for 5 minutes for the server to restore the account cache
46+
# Without this, the test will pass non-deterministically
47+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
48+
4549
# submit a job
4650
$guidForJob = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateGuid("relationTest01")
4751

@@ -576,6 +580,10 @@ function Test-DataLakeAnalyticsJob
576580
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
577581
}
578582

583+
# Wait for 5 minutes for the server to restore the account cache
584+
# Without this, the test will pass non-deterministically
585+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
586+
579587
# submit a job
580588
$guidForJob = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateGuid("jobTest02")
581589
[Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsClient]::JobIdQueue.Enqueue($guidForJob)
@@ -595,12 +603,12 @@ function Test-DataLakeAnalyticsJob
595603

596604
Assert-NotNull {Get-AdlJob -AccountName $accountName}
597605

598-
$jobsWithDateOffset = Get-AdlJob -AccountName $accountName -SubmittedAfter $([DateTimeOffset]($nowTime).AddMinutes(-5))
606+
$jobsWithDateOffset = Get-AdlJob -AccountName $accountName -SubmittedAfter $([DateTimeOffset]($nowTime).AddMinutes(-10))
599607

600-
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted after five miuntes ago"
608+
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted after ten miuntes ago"
601609

602-
# we add five minutes to ensure that the timing is right, since we are using the account creation time, and not truly "now"
603-
$jobsWithDateOffset = Get-AdlJob -AccountName $accountName -SubmittedBefore $([DateTimeOffset]($nowTime).AddMinutes(5))
610+
# we add ten minutes to ensure that the timing is right, since we are using the account creation time, and not truly "now"
611+
$jobsWithDateOffset = Get-AdlJob -AccountName $accountName -SubmittedBefore $([DateTimeOffset]($nowTime).AddMinutes(10))
604612

605613
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted before right now"
606614

@@ -817,6 +825,10 @@ function Test-DataLakeAnalyticsCatalog
817825
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(30000)
818826
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
819827
}
828+
829+
# Wait for 5 minutes for the server to restore the account cache
830+
# Without this, the test will pass non-deterministically
831+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
820832

821833
# Run a job to create the catalog items (except secret and credential)
822834
$scriptTemplate = @"

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/AdlaTests.ps1

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ function Test-DataLakeAnalyticsJob
467467
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
468468
}
469469

470+
# Wait for 5 minutes for the server to restore the account cache
471+
# Without this, the test will pass non-deterministically
472+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
473+
470474
# submit a job
471475
$guidForJob = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateGuid("jobTest01")
472476
[Microsoft.Azure.Commands.DataLakeAnalytics.Models.DataLakeAnalyticsClient]::JobIdQueue.Enqueue($guidForJob)
@@ -485,11 +489,12 @@ function Test-DataLakeAnalyticsJob
485489

486490
Assert-NotNull {Get-AzureRmDataLakeAnalyticsJob -AccountName $accountName}
487491

488-
$jobsWithDateOffset = Get-AzureRmDataLakeAnalyticsJob -AccountName $accountName -SubmittedAfter $([DateTimeOffset]($nowTime).AddMinutes(-5))
492+
$jobsWithDateOffset = Get-AzureRmDataLakeAnalyticsJob -AccountName $accountName -SubmittedAfter $([DateTimeOffset]($nowTime).AddMinutes(-10))
493+
494+
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted after ten miuntes ago"
489495

490-
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted after five miuntes ago"
491-
# we add five minutes to ensure that the timing is right, since we are using the account creation time, and not truly "now"
492-
$jobsWithDateOffset = Get-AzureRmDataLakeAnalyticsJob -AccountName $accountName -SubmittedBefore $([DateTimeOffset]($nowTime).AddMinutes(5))
496+
# we add ten minutes to ensure that the timing is right, since we are using the account creation time, and not truly "now"
497+
$jobsWithDateOffset = Get-AzureRmDataLakeAnalyticsJob -AccountName $accountName -SubmittedBefore $([DateTimeOffset]($nowTime).AddMinutes(10))
493498

494499
Assert-True {$jobsWithDateOffset.Count -gt 0} "Failed to retrieve jobs submitted before right now"
495500

@@ -553,6 +558,10 @@ function Test-DataLakeAnalyticsJobRelationships
553558
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
554559
}
555560

561+
# Wait for 5 minutes for the server to restore the account cache
562+
# Without this, the test will pass non-deterministically
563+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
564+
556565
# submit a job
557566
$guidForJob = [Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::GenerateGuid("relationTest01")
558567

@@ -815,6 +824,10 @@ function Test-DataLakeAnalyticsCatalog
815824
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(30000)
816825
Assert-False {$i -eq 60} "dataLakeAnalytics accounts not in succeeded state even after 30 min."
817826
}
827+
828+
# Wait for 5 minutes for the server to restore the account cache
829+
# Without this, the test will pass non-deterministically
830+
[Microsoft.Rest.ClientRuntime.Azure.TestFramework.TestUtilities]::Wait(300000)
818831

819832
# Run a job to create the catalog items (except secret and credential)
820833
$scriptTemplate = @"

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/packages.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
66
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
77
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
8-
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="3.0.0" targetFramework="net452" />
9-
<package id="Microsoft.Azure.Management.DataLake.Store" version="2.2.0" targetFramework="net452" />
8+
<package id="Microsoft.Azure.Management.DataLake.Analytics" version="3.1.2-preview" targetFramework="net452" />
9+
<package id="Microsoft.Azure.Management.DataLake.Store" version="2.3.0-preview" targetFramework="net452" />
1010
<package id="Microsoft.Azure.Management.ResourceManager" version="1.1.1-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Management.Storage" version="3.0.0" targetFramework="net45" />
@@ -17,8 +17,8 @@
1717
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
1818
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
1919
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
20-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
21-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" />
20+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.10" targetFramework="net452" />
21+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.10" targetFramework="net452" />
2222
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.9-preview" targetFramework="net45" />
2323
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.5.1-preview" targetFramework="net45" />
2424
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands.DataLakeAnalytics.csproj

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,19 @@
3838
<ItemGroup>
3939
<Reference Include="Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
4040
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.3.0.0\lib\net452\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
41+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.DataLake.Analytics.3.1.2-preview\lib\net452\Microsoft.Azure.Management.DataLake.Analytics.dll</HintPath>
42+
<Private>True</Private>
43+
</Reference>
44+
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
45+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.10\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
46+
<Private>True</Private>
47+
</Reference>
48+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
49+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.10\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
50+
<Private>True</Private>
51+
</Reference>
52+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
53+
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
4254
<Private>True</Private>
4355
</Reference>
4456
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
@@ -76,14 +88,13 @@
7688
<Compile Include="Commands\RemoveAzureRmDataLakeAnalyticsAccount.cs" />
7789
<Compile Include="Commands\SetAzureRmDataLakeAnalyticsAccount.cs" />
7890
<Compile Include="Models\DataLakeAnalyticsFirewallRule.cs" />
91+
<Compile Include="Models\PSDataLakeAnalyticsAccountBasic.cs" />
92+
<Compile Include="Models\PSJobInformationBasic.cs" />
7993
<Compile Include="Models\PSJobRecurrenceInformation.cs" />
8094
<Compile Include="Models\PSJobPipelineInformation.cs" />
8195
<Compile Include="Models\PSDataLakeAnalyticsComputePolicy.cs" />
8296
<Compile Include="Models\PSDataLakeStoreAccountInfo.cs" />
8397
<Compile Include="Models\PSStorageAccountInfo.cs" />
84-
<Compile Include="Models\PSStorageAccountInfoProperties.cs" />
85-
<Compile Include="Models\PSDataLakeStoreAccountInfoProperties.cs" />
86-
<Compile Include="Models\PSDataLakeAnalyticsAccountProperties.cs" />
8798
<Compile Include="Models\PSDataLakeAnalyticsAccount.cs" />
8899
<Compile Include="Models\ObsoleteUSqlCredential.cs" />
89100
<Compile Include="Models\AdlDataSource.cs" />
@@ -111,9 +122,7 @@
111122
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
112123
</None>
113124
<None Include="MSSharedLibKey.snk" />
114-
<None Include="packages.config">
115-
<SubType>Designer</SubType>
116-
</None>
125+
<None Include="packages.config" />
117126
</ItemGroup>
118127
<ItemGroup>
119128
<EmbeddedResource Include="Properties\Resources.resx">

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsAccount.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2323
{
2424
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsAccount", DefaultParameterSetName = BaseParameterSetName),
25-
OutputType(typeof(List<DataLakeAnalyticsAccount>), typeof(PSDataLakeAnalyticsAccount))]
25+
OutputType(typeof(List<PSDataLakeAnalyticsAccountBasic>), typeof(PSDataLakeAnalyticsAccount))]
2626
[Alias("Get-AdlAnalyticsAccount")]
2727
public class GetAzureDataLakeAnalyticsAccount : DataLakeAnalyticsCmdletBase
2828
{
@@ -55,7 +55,7 @@ public override void ExecuteCmdlet()
5555
WriteWarning(Resources.IncorrectOutputTypeWarning);
5656
// List all accounts in given resource group if avaliable otherwise all accounts in the subscription
5757
WriteObject(DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null)
58-
.Select(element => new PSDataLakeAnalyticsAccount(element))
58+
.Select(element => new PSDataLakeAnalyticsAccountBasic(element))
5959
.ToList(), true);
6060
}
6161
}

src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics/Commands/GetAzureRmDataLakeAnalyticsJob.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Microsoft.Azure.Commands.DataLakeAnalytics
2525
{
2626
[Cmdlet(VerbsCommon.Get, "AzureRmDataLakeAnalyticsJob", DefaultParameterSetName = BaseParameterSetName),
27-
OutputType(typeof(List<JobInformation>), typeof(JobInformation))]
27+
OutputType(typeof(List<PSJobInformationBasic>), typeof(JobInformation))]
2828
[Alias("Get-AdlJob")]
2929
public class GetAzureDataLakeAnalyticsJob : DataLakeAnalyticsCmdletBase
3030
{
@@ -193,8 +193,10 @@ public override void ExecuteCmdlet()
193193

194194
// List the jobs with the given filters
195195
bool warnUser;
196-
var list = DataLakeAnalyticsClient.ListJobs(Account,
197-
string.IsNullOrEmpty(filterString) ? null : filterString, Top, null, "submitTime desc", out warnUser);
196+
var list = DataLakeAnalyticsClient.ListJobs(Account,
197+
string.IsNullOrEmpty(filterString) ? null : filterString, Top, null, "submitTime desc", out warnUser)
198+
.Select(element => new PSJobInformationBasic(element))
199+
.ToList();
198200
if (warnUser)
199201
{
200202
WriteWarning(string.Format(Resources.MoreJobsToGetWarning, Top.HasValue ? Top.Value : 500));

0 commit comments

Comments
 (0)