2
2
3
3
Azure Resource Manager HDInsight client library for Java.
4
4
5
- This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2024-08 -preview. For documentation on how to use this package, please see [ Azure Management Libraries for Java] ( https://aka.ms/azsdk/java/mgmt ) .
5
+ This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2025-01 -preview. For documentation on how to use this package, please see [ Azure Management Libraries for Java] ( https://aka.ms/azsdk/java/mgmt ) .
6
6
7
7
## We'd love to hear your feedback
8
8
@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
52
52
Assuming the use of the ` DefaultAzureCredential ` credential class, the client can be authenticated using the following code:
53
53
54
54
``` java
55
- AzureProfile profile = new AzureProfile (AzureEnvironment . AZURE );
55
+ AzureProfile profile = new AzureProfile (AzureCloud . AZURE_PUBLIC_CLOUD );
56
56
TokenCredential credential = new DefaultAzureCredentialBuilder ()
57
57
.authorityHost(profile. getEnvironment(). getActiveDirectoryEndpoint())
58
58
.build();
59
59
HDInsightManager manager = HDInsightManager
60
60
.authenticate(credential, profile);
61
61
```
62
62
63
- The sample code assumes global Azure. Please change ` AzureEnvironment.AZURE ` variable if otherwise.
63
+ The sample code assumes global Azure. Please change the ` AzureCloud.AZURE_PUBLIC_CLOUD ` variable if otherwise.
64
64
65
65
See [ Authentication] [ authenticate ] for more options.
66
66
@@ -71,75 +71,68 @@ See [API design][design] for general introduction on design and key concepts on
71
71
## Examples
72
72
73
73
``` java
74
- com.azure.resourcemanager.storage.models. StorageAccount storageAccount =
75
- storageManager . storageAccounts() . define(storageName)
76
- .withRegion(REGION )
77
- .withExistingResourceGroup(resourceGroupName)
78
- .withSku(StorageAccountSkuType . STANDARD_LRS )
79
- .withMinimumTlsVersion(MinimumTlsVersion . TLS1_0 )
80
- .withAccessFromAzureServices()
81
- .withAccessFromAllNetworks()
82
- .create();
74
+ com.azure.resourcemanager.storage.models. StorageAccount storageAccount = storageManager . storageAccounts()
75
+ .define(storageName)
76
+ .withRegion(REGION )
77
+ .withExistingResourceGroup(resourceGroupName)
78
+ .withSku(StorageAccountSkuType . STANDARD_LRS )
79
+ .withMinimumTlsVersion(MinimumTlsVersion . TLS1_0 )
80
+ .withAccessFromAzureServices()
81
+ .withAccessFromAllNetworks()
82
+ .create();
83
83
84
84
BlobContainer blobContainer = storageManager. blobContainers()
85
85
.defineContainer(containerName)
86
86
.withExistingStorageAccount(storageAccount)
87
87
.withPublicAccess(PublicAccess . NONE )
88
88
.create();
89
89
90
- cluster = hdInsightManager. clusters()
91
- .define(clusterName)
92
- .withExistingResourceGroup(resourceGroupName)
93
- .withRegion(REGION )
94
- .withProperties(
95
- new ClusterCreateProperties ()
96
- .withClusterVersion(" 4.0.3000.1" )
97
- .withOsType(OSType . LINUX )
98
- .withClusterDefinition(
99
- new ClusterDefinition ()
100
- .withKind(" SPARK" )
90
+ cluster
91
+ = hdInsightManager. clusters()
92
+ .define(clusterName)
93
+ .withExistingResourceGroup(resourceGroupName)
94
+ .withRegion(REGION )
95
+ .withProperties(
96
+ new ClusterCreateProperties (). withClusterVersion(" 4.0.3000.1" )
97
+ .withOsType(OSType . LINUX )
98
+ .withClusterDefinition(new ClusterDefinition (). withKind(" SPARK" )
101
99
.withConfigurations(Collections . unmodifiableMap(clusterDefinition)))
102
- .withComputeProfile(
103
- new ComputeProfile ()
104
- .withRoles(
105
- Arrays . asList(
106
- new Role (). withName(" headnode" )
107
- .withTargetInstanceCount(2 )
108
- .withHardwareProfile(new HardwareProfile (). withVmSize(" standard_e8_v3" ))
109
- .withOsProfile(osProfile)
110
- .withEncryptDataDisks(false ),
111
- new Role (). withName(" workernode" )
112
- .withTargetInstanceCount(4 )
113
- .withHardwareProfile(new HardwareProfile (). withVmSize(" standard_e8_v3" ))
114
- .withOsProfile(osProfile)
115
- .withEncryptDataDisks(false ),
116
- new Role (). withName(" zookeepernode" )
117
- .withTargetInstanceCount(3 )
118
- .withHardwareProfile(new HardwareProfile (). withVmSize(" standard_a2_v2" ))
119
- .withOsProfile(osProfile)
120
- .withEncryptDataDisks(false )
121
- )))
122
- .withTier(Tier . STANDARD )
123
- .withEncryptionInTransitProperties(
124
- new EncryptionInTransitProperties ()
125
- .withIsEncryptionInTransitEnabled(false ))
126
- .withStorageProfile(
127
- new StorageProfile ()
128
- .withStorageaccounts(
129
- Arrays . asList(
130
- new StorageAccount ()
131
- .withName(storageName + " .blob.core.windows.net" )
132
- .withResourceId(storageAccount. id())
133
- .withContainer(blobContainer. name())
134
- .withIsDefault(true )
135
- .withKey(storageAccount. getKeys(). iterator(). next(). value()))
136
- ))
137
- .withMinSupportedTlsVersion(" 1.2" )
138
- .withComputeIsolationProperties(
139
- new ComputeIsolationProperties ()
140
- .withEnableComputeIsolation(false ))
141
- )
142
- .create();
100
+ .withComputeProfile(
101
+ new ComputeProfile ()
102
+ .withRoles(
103
+ Arrays
104
+ .asList(
105
+ new Role (). withName(" headnode" )
106
+ .withTargetInstanceCount(2 )
107
+ .withHardwareProfile(
108
+ new HardwareProfile (). withVmSize(" standard_e8_v3" ))
109
+ .withOsProfile(osProfile)
110
+ .withEncryptDataDisks(false ),
111
+ new Role (). withName(" workernode" )
112
+ .withTargetInstanceCount(4 )
113
+ .withHardwareProfile(
114
+ new HardwareProfile (). withVmSize(" standard_e8_v3" ))
115
+ .withOsProfile(osProfile)
116
+ .withEncryptDataDisks(false ),
117
+ new Role (). withName(" zookeepernode" )
118
+ .withTargetInstanceCount(3 )
119
+ .withHardwareProfile(
120
+ new HardwareProfile (). withVmSize(" standard_a2_v2" ))
121
+ .withOsProfile(osProfile)
122
+ .withEncryptDataDisks(false ))))
123
+ .withTier(Tier . STANDARD )
124
+ .withEncryptionInTransitProperties(
125
+ new EncryptionInTransitProperties (). withIsEncryptionInTransitEnabled(false ))
126
+ .withStorageProfile(new StorageProfile (). withStorageaccounts(
127
+ Arrays . asList(new StorageAccount (). withName(storageName + " .blob.core.windows.net" )
128
+ .withResourceId(storageAccount. id())
129
+ .withContainer(blobContainer. name())
130
+ .withIsDefault(true )
131
+ .withKey(storageAccount. getKeys(). iterator(). next(). value()))))
132
+ .withMinSupportedTlsVersion(" 1.2" )
133
+ .withComputeIsolationProperties(
134
+ new ComputeIsolationProperties (). withEnableComputeIsolation(false )))
135
+ .create();
143
136
```
144
137
[ Code snippets and samples] ( https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md )
145
138
@@ -171,5 +164,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
171
164
[ cg ] : https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
172
165
[ coc ] : https://opensource.microsoft.com/codeofconduct/
173
166
[ coc_faq ] : https://opensource.microsoft.com/codeofconduct/faq/
174
-
175
-
0 commit comments