Skip to content

Commit 217be38

Browse files
yuc-Liv-yuchenliVeryEarly
authored
[HDInsight] Fix bug: missing display for abfss info. (#23247)
* fix bug. * Remove warning messages. * Update. * Update ChangeLog.md --------- Co-authored-by: v-yuchenli <[email protected]> Co-authored-by: Yabo Hu <[email protected]>
1 parent 05283f6 commit 217be38

25 files changed

+4
-71
lines changed

src/HDInsight/HDInsight/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed a bug where the get cluster command does not display abfss storage information.
2122

2223
## Version 6.0.1
2324
* This change adds some warning messages to the incoming break changes for the next version, with detailed information as follows:

src/HDInsight/HDInsight/ClusterConfigurationUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public static AzureHDInsightDefaultStorageAccount GetDefaultStorageAccountDetail
5555
const string WasbPrefix = "wasb://";
5656
const string SecureWasbPrefix = "wasbs://";
5757
const string AdlsGen2Prefix = "abfs://";
58+
const string AdlsGen2TLSPrefix = "abfss://";
5859

5960
if (coreSiteConfiguration.TryGetValue(key, out defaultFSUrl))
6061
{
@@ -102,7 +103,7 @@ public static AzureHDInsightDefaultStorageAccount GetDefaultStorageAccountDetail
102103
storageAccountKey: storageAccountKey
103104
);
104105
}
105-
else if (defaultFSUrl.StartsWith(AdlsGen2Prefix))
106+
else if (defaultFSUrl.StartsWith(AdlsGen2Prefix) || defaultFSUrl.StartsWith(AdlsGen2TLSPrefix))
106107
{
107108
string[] accountAndFileSystem;
108109
accountAndFileSystem = defaultFSUrl.Substring(AdlsGen2Prefix.Length).Split('@');

src/HDInsight/HDInsight/Constants.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ namespace Microsoft.Azure.Commands.HDInsight
1616
internal static class Constants
1717
{
1818
public const string Hadoop = "Hadoop";
19-
public const string deprecateByAzVersion = "11.0.0";
20-
public const string deprecateByVersion = "7.0.0";
21-
public const string diskEncryptionChangeInfo = "The type of property 'DiskEncryption' of type 'Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightCluster' will change from 'Microsoft.Azure.Management.HDInsight.Models.DiskEncryptionProperties' to 'Azure.ResourceManager.HDInsight.Models.HDInsightDiskEncryptionProperties'.";
22-
public const string workerNodeDataDisksGroupsChangeInfo = "The type of property 'WorkerNodeDataDisksGroups' will change from 'List<Microsoft.Azure.Management.HDInsight.Models.DataDisksGroups>' to 'List<Azure.ResourceManager.HDInsight.Models.HDInsightClusterDataDiskGroup>'.";
23-
19+
2420
public static class CommandNames
2521
{
2622
public const string AzureHDInsightCluster = "AzureRmHDInsightCluster";

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightClusterIdentity.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1817
using System;
1918
using System.Management.Automation;
2019

2120
namespace Microsoft.Azure.Commands.HDInsight.ManagementCommands
2221
{
23-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
24-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
25-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2622
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightClusterIdentity",DefaultParameterSetName = CertificateFilePathSet),OutputType(typeof(AzureHDInsightConfig))]
2723
public class AddAzureHDInsightClusterIdentity : HDInsightCmdletBase
2824
{

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightComponentVersionCommand.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1817
using System.Management.Automation;
1918

2019
namespace Microsoft.Azure.Commands.HDInsight
2120
{
22-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
23-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
24-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2521
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightComponentVersion",SupportsShouldProcess = true),OutputType(typeof(AzureHDInsightConfig))]
2622
public class AddAzureHDInsightComponentVersionCommand : HDInsightCmdletBase
2723
{

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightConfigValuesCommand.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@
1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
1717
using Microsoft.Azure.Management.HDInsight.Models;
18-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1918
using System.Collections;
2019
using System.Collections.Generic;
2120
using System.Management.Automation;
2221

2322
namespace Microsoft.Azure.Commands.HDInsight
2423
{
25-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
26-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
27-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2824
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightConfigValue"),OutputType(typeof(AzureHDInsightConfig))]
2925
public class AddAzureHDInsightConfigValuesCommand : HDInsightCmdletBase
3026
{

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightMetastoreCommand.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1817
using System.Management.Automation;
1918

2019
namespace Microsoft.Azure.Commands.HDInsight
2120
{
22-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
23-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
24-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2521
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightMetastore"),OutputType(typeof(AzureHDInsightConfig))]
2622
public class AddAzureHDInsightMetastoreCommand : HDInsightCmdletBase
2723
{

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightScriptActionCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using Microsoft.Azure.Commands.HDInsight.Models;
1717
using Microsoft.Azure.Commands.HDInsight.Models.Management;
1818
using Microsoft.Azure.Management.HDInsight.Models;
19-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2019
using System;
2120
using System.Collections.Generic;
2221
using System.Management.Automation;
@@ -35,7 +34,6 @@ public class AddAzureHDInsightScriptActionCommand : HDInsightCmdletBase
3534
HelpMessage = "The HDInsight cluster configuration to use when creating the new cluster.")]
3635
public AzureHDInsightConfig Config { get; set; }
3736

38-
[CmdletParameterBreakingChangeWithVersion("NodeType",Constants.deprecateByAzVersion, Constants.deprecateByVersion, OldParamaterType = typeof(ClusterNodeType), NewParameterTypeName = "RuntimeScriptActionClusterNodeType")]
3937
[Parameter(Position = 1,
4038
Mandatory = true,
4139
HelpMessage = "The node on which to apply the action.")]

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightSecurityProfile.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@
1717
using Microsoft.Azure.Commands.HDInsight.Commands;
1818
using Microsoft.Azure.Commands.HDInsight.Models;
1919
using System.Management.Automation;
20-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2120

2221
namespace Microsoft.Azure.Commands.HDInsight
2322
{
24-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
25-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
26-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2723
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightSecurityProfile",SupportsShouldProcess = true),OutputType(typeof(AzureHDInsightSecurityProfile))]
2824
public class AddAzureHDInsightSecurityProfile : HDInsightCmdletBase
2925
{

src/HDInsight/HDInsight/ManagementCommands/AddAzureHDInsightStorageCommand.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@
1414

1515
using Microsoft.Azure.Commands.HDInsight.Commands;
1616
using Microsoft.Azure.Commands.HDInsight.Models;
17-
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1817
using System.Management.Automation;
1918

2019
namespace Microsoft.Azure.Commands.HDInsight
2120
{
22-
[CmdletOutputBreakingChangeWithVersion(typeof(AzureHDInsightConfig), Constants.deprecateByAzVersion, Constants.deprecateByVersion,
23-
DeprecatedOutputProperties = new string[] {"Dictionary<ClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"},
24-
NewOutputProperties = new string[] {"Dictionary<RuntimeScriptActionClusterNodeType, List<AzureHDInsightScriptAction>> ScriptActions"})]
2521
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "HDInsightStorage"),OutputType(typeof(AzureHDInsightConfig))]
2622
public class AddAzureHDInsightStorageCommand : HDInsightCmdletBase
2723
{

0 commit comments

Comments
 (0)