Set-AzHDInsightDefaultStorage
設定叢集組態物件中的預設記憶體帳戶設定。
語法
Set-AzHDInsightDefaultStorage
[-Config] <AzureHDInsightConfig>
[-StorageAccountResourceId] <String>
[[-StorageAccountKey] <String>]
[-StorageAccountType <StorageType>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Set-AzHDInsightDefaultStorage Cmdlet 會在 New-AzHDInsightClusterConfig Cmdlet 所建立的 Azure HDInsight 叢集組態物件中設定預設的記憶體帳戶設定。
範例
範例 1:設定叢集組態對象的預設記憶體帳戶
# Primary storage account info
$storageAccountResourceGroupName = "Group"
$storageAccountResourceId = "yourstorageaccountresourceid"
$storageAccountName = "yourstorageaccountname"
$storageAccountKey = (Get-AzStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
$storageType = "AzureStorage"
# Cluster configuration info
$location = "East US 2"
$clusterResourceGroupName = "Group"
$clusterName = "your-hadoop-002"
$clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzResourceGroup -Name $clusterResourceGroupName -Location $location
# Create the cluster
New-AzHDInsightClusterConfig `
| Set-AzHDInsightDefaultStorage `
-StorageAccountResourceId $storageAccountResourceId `
-StorageAccountKey $key2 `
-StorageAccountType $storageType `
| New-AzHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location
此命令會設定叢集組態對象的預設記憶體帳戶。
參數
-Config
指定此 Cmdlet 修改的 HDInsight 叢集組態物件。 此物件是由 New-AzHDInsightClusterConfig Cmdlet 所建立。
類型: | AzureHDInsightConfig |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StorageAccountKey
指定 HDInsight 叢集將使用之預設 Azure 記憶體帳戶的帳戶的帳戶金鑰。
類型: | String |
Position: | 2 |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StorageAccountResourceId
要新增至新叢集之記憶體帳戶的記憶體帳戶名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-StorageAccountType
取得或設定預設記憶體帳戶的類型。 默認為 AzureStorage
類型: | Nullable<T>[StorageType] |
接受的值: | AzureStorage, AzureDataLakeStore, AzureDataLakeStorageGen2 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |