Skip to content

Commit 3ec5cf4

Browse files
author
Zhenyu Zhou
committed
Deprecate Parameters
1 parent 604055a commit 3ec5cf4

File tree

10 files changed

+823
-215
lines changed

10 files changed

+823
-215
lines changed

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ public void TestCreateClusterWithEncryptionInTransit()
5050
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateClusterWithEncryptionInTransit");
5151
}
5252

53-
[Fact]
54-
[Trait(Category.AcceptanceType, Category.CheckIn)]
55-
public void TestCreateClusterWithPrivateLink()
56-
{
57-
TestController.NewInstance.RunPowerShellTest(_logger, "Test-CreateClusterWithPrivateLink");
58-
}
59-
6053
[Fact]
6154
[Trait(Category.AcceptanceType, Category.CheckIn)]
6255
public void TestCreateClusterWithEncryptionAtHost()

src/HDInsight/HDInsight.Test/ScenarioTests/HDInsightClusterTests.ps1

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -125,45 +125,6 @@ function Test-CreateClusterWithEncryptionInTransit{
125125
}
126126
}
127127

128-
<#
129-
.SYNOPSIS
130-
Test Create Azure HDInsight Cluster which Private Link
131-
#>
132-
133-
function Test-CreateClusterWithPrivateLink{
134-
135-
# Create some resources that will be used throughout test
136-
try
137-
{
138-
# prepare parameter for creating parameter
139-
$params= Prepare-ClusterCreateParameterForWASB -location "South Central US"
140-
141-
# Prepare virtual network
142-
$vnetName=Generate-Name("hdi-ps-vnet")
143-
$vnet=Create-VnetkWithSubnet -location $params.location -resourceGroupName $params.resourceGroupName `
144-
-vnetName $vnetName -subnetPrivateLinkServiceNetworkPoliciesFlag $false
145-
146-
# create cluster
147-
$cluster=New-AzHDInsightCluster -Location $params.location -ResourceGroupName $params.resourceGroupName `
148-
-ClusterName $params.clusterName -ClusterSizeInNodes $params.clusterSizeInNodes -ClusterType $params.clusterType `
149-
-DefaultStorageAccountName $params.storageAccountName -DefaultStorageAccountKey $params.storageAccountKey `
150-
-HttpCredential $params.httpCredential -SshCredential $params.sshCredential `
151-
-MinSupportedTlsVersion $params.minSupportedTlsVersion `
152-
-VirtualNetworkId $vnet.Id -SubnetName $vnet.Subnets[0].Id `
153-
-PublicNetworkAccessType OutboundOnly -OutboundPublicNetworkAccessType PublicLoadBalancer
154-
155-
Assert-AreEqual $cluster.PublicNetworkAccessType OutboundOnly
156-
Assert-AreEqual $cluster.OutboundPublicNetworkAccessType PublicLoadBalancer
157-
158-
}
159-
finally
160-
{
161-
# Delete cluster and resource group
162-
Remove-AzHDInsightCluster -ClusterName $cluster.Name
163-
Remove-AzResourceGroup -ResourceGroupName $cluster.ResourceGroup
164-
}
165-
}
166-
167128
<#
168129
.SYNOPSIS
169130
Test Create Azure HDInsight Cluster which enalbes Encryption At Host

src/HDInsight/HDInsight/ClusterCreateHelper.cs

Lines changed: 407 additions & 0 deletions
Large diffs are not rendered by default.

src/HDInsight/HDInsight/Constants.cs

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,91 @@ public static class ClusterConfiguration
5757
public const string DefaultStorageAccountNameKeyOld = "fs.default.name";
5858
public const string StorageAccountKeyPrefix = "fs.azure.account.key.";
5959
}
60+
61+
public static class GatewayConfigurations
62+
{
63+
public const string CredentialIsEnabledKey = "restAuthCredential.isEnabled";
64+
public const string UserNameKey = "restAuthCredential.username";
65+
public const string PasswordKey = "restAuthCredential.password";
66+
}
67+
68+
public static class StorageConfigurations
69+
{
70+
public const string BlobStorageSuffixValueFormat = ".blob.{0}";
71+
public const string Adlsgen2StorageSuffixValueFormat = ".dfs.{0}";
72+
public const string DefaultFsKey = "fs.defaultFS";
73+
public const string WasbStorageAccountKeyFormat = "fs.azure.account.key.{0}";
74+
public const string AdlHostNameKey = "dfs.adls.home.hostname";
75+
public const string AdlMountPointKey = "dfs.adls.home.mountpoint";
76+
77+
public const string DefaultFsWasbValueFormat = "wasb://{0}@{1}";
78+
public const string DefaultFsAdlValue = "adl://home";
79+
}
80+
81+
public static class DataLakeConfigurations
82+
{
83+
public const string ApplicationIdKey = "clusterIdentity.applicationId";
84+
public const string TenantIdKey = "clusterIdentity.aadTenantId";
85+
public const string CertificateKey = "clusterIdentity.certificate";
86+
public const string CertificatePasswordKey = "clusterIdentity.certificatePassword";
87+
public const string ResourceUriKey = "clusterIdentity.resourceUri";
88+
}
89+
90+
public static class MetastoreConfigurations
91+
{
92+
public const string ConnectionUrlFormat =
93+
"jdbc:sqlserver://{0};database={1};encrypt=true;trustServerCertificate=true;create=false;loginTimeout=300;sendStringParametersAsUnicode=true;prepareSQL=0";
94+
95+
public const string DatabaseValue = "Existing MSSQL Server database with SQL authentication";
96+
public const string DatabaseTypeValue = "mssql";
97+
98+
public static class HiveSite
99+
{
100+
public const string ConnectionUrlKey = "javax.jdo.option.ConnectionURL";
101+
public const string ConnectionUserNameKey = "javax.jdo.option.ConnectionUserName";
102+
public const string ConnectionPasswordKey = "javax.jdo.option.ConnectionPassword";
103+
public const string ConnectionDriverNameKey = "javax.jdo.option.ConnectionDriverName";
104+
105+
public const string ConnectionDriverNameValue = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
106+
}
107+
108+
public static class HiveEnv
109+
{
110+
public const string DatabaseKey = "hive_database";
111+
public const string DatabaseNameKey = "hive_database_name";
112+
public const string DatabaseTypeKey = "hive_database_type";
113+
public const string ExistingDatabaseKey = "hive_existing_mssql_server_database";
114+
public const string ExistingHostKey = "hive_existing_mssql_server_host";
115+
public const string HostNameKey = "hive_hostname";
116+
}
117+
118+
public static class OozieSite
119+
{
120+
public const string UrlKey = "oozie.service.JPAService.jdbc.url";
121+
public const string UserNameKey = "oozie.service.JPAService.jdbc.username";
122+
public const string PasswordKey = "oozie.service.JPAService.jdbc.password";
123+
public const string DriverKey = "oozie.service.JPAService.jdbc.driver";
124+
public const string SchemaKey = "oozie.db.schema.name";
125+
126+
public const string DriverValue = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
127+
public const string SchemaValue = "oozie";
128+
}
129+
130+
public static class OozieEnv
131+
{
132+
public const string DatabaseKey = "oozie_database";
133+
public const string DatabaseNameKey = "oozie_database_name";
134+
public const string DatabaseTypeKey = "oozie_database_type";
135+
public const string ExistingDatabaseKey = "oozie_existing_mssql_server_database";
136+
public const string ExistingHostKey = "oozie_existing_mssql_server_host";
137+
public const string HostNameKey = "oozie_hostname";
138+
}
139+
}
140+
141+
public static class Errors
142+
{
143+
public static string ERROR_INPUT_CANNOT_BE_EMPTY = "Input cannot be empty";
144+
public static string ERROR_SCHEME_SPECIFIED_IN_STORAGE_FQDN = "Please specify fully qualified storage endpoint without the scheme";
145+
}
60146
}
61147
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
//
2+
// Copyright Microsoft Corporation
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
// Unless required by applicable law or agreed to in writing, software
8+
// distributed under the License is distributed on an "AS IS" BASIS,
9+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
// See the License for the specific language governing permissions and
11+
// limitations under the License.
12+
// ----------------------------------------------------------------------------------
13+
14+
namespace Microsoft.Azure.Commands.HDInsight
15+
{
16+
using System;
17+
using System.Collections.Generic;
18+
19+
public static class DefaultVmSizes
20+
{
21+
public static class HeadNode
22+
{
23+
private const string DefaultSizeIfNotSpecified = "Large";
24+
25+
private static readonly Dictionary<string, string> DefaultSizes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
26+
{
27+
{"hadoop", "Standard_D3_v2"},
28+
{"spark", "Standard_D12_v2"},
29+
{"rserver", "Standard_D12_v2"},
30+
{"mlservices", "Standard_D12_v2"},
31+
{"InteractiveHive", "Standard_D13_v2"},
32+
{"Sandbox", "Standard_D13_V2"}
33+
};
34+
35+
public static string GetSize(string clusterType)
36+
{
37+
if (!DefaultSizes.TryGetValue(clusterType.ToLowerInvariant(), out string nodeSize))
38+
{
39+
nodeSize = DefaultSizeIfNotSpecified;
40+
}
41+
42+
return nodeSize;
43+
}
44+
}
45+
46+
public static class WorkerNode
47+
{
48+
private const string DefaultSizeIfNotSpecified = "Standard_D3_v2";
49+
50+
private static readonly Dictionary<string, string> DefaultSizes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
51+
{
52+
{"spark", "Standard_D12_v2"},
53+
{"rserver", "Standard_D4_v2"},
54+
{"mlservices", "Standard_D4_v2"},
55+
{"InteractiveHive", "Standard_D13_v2"},
56+
};
57+
58+
public static string GetSize(string clusterType)
59+
{
60+
if (!DefaultSizes.TryGetValue(clusterType.ToLowerInvariant(), out string nodeSize))
61+
{
62+
nodeSize = DefaultSizeIfNotSpecified;
63+
}
64+
65+
return nodeSize;
66+
}
67+
}
68+
69+
public static class ZookeeperNode
70+
{
71+
private const string DefaultSizeIfNotSpecified = "Medium";
72+
73+
private static readonly Dictionary<string, string> DefaultSizes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
74+
{
75+
{"hadoop", "Small"},
76+
{"spark", "Small"}
77+
};
78+
79+
public static string GetSize(string clusterType)
80+
{
81+
if (!DefaultSizes.TryGetValue(clusterType.ToLowerInvariant(), out string nodeSize))
82+
{
83+
nodeSize = DefaultSizeIfNotSpecified;
84+
}
85+
86+
return nodeSize;
87+
}
88+
}
89+
90+
public static class EdgeNode
91+
{
92+
private const string DefaultSizeIfNotSpecified = "Standard_D4_v2";
93+
94+
private static readonly Dictionary<string, string> DefaultSizes = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
95+
96+
public static string GetSize(string clusterType)
97+
{
98+
if (!DefaultSizes.TryGetValue(clusterType.ToLowerInvariant(), out string nodeSize))
99+
{
100+
nodeSize = DefaultSizeIfNotSpecified;
101+
}
102+
103+
return nodeSize;
104+
}
105+
}
106+
}
107+
}

0 commit comments

Comments
 (0)