Set-AzureHDInsightDefaultStorage
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Set-AzureHDInsightDefaultStorage
Sets default storage account setting in the HDInsight cluster configuration object.
Syntax
Parameter Set: Set Default Storage Account
Set-AzureHDInsightDefaultStorage [-Config] <AzureHDInsightConfig> [-StorageAccountName] <String> [-StorageAccountKey] <String> [-StorageContainerName] <String> [ <CommonParameters>]
Detailed Description
Sets default storage account setting in the HDInsight cluster configuration object.
This topic describes the cmdlet in the 0.8.1 version of the Microsoft Azure PowerShell module. To find out the version of the module you're using, from the Azure PowerShell console, type (get-module azure).version.
Parameters
-Config<AzureHDInsightConfig>
The configuration object in which to set default storage account information.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-StorageAccountKey<String>
The storage account key needed to access the default storage account.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageAccountName<String>
The name of the default storage account.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageContainerName<String>
Name of the default storage container for the cluster.
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Sets default storage account
Set default storage account setting in the HDInsight cluster configuration object.
PS C:\> $subid = (Get-AzureSubscription –Current).SubscriptionId
$key1 = Get-AzureStorageKey yourblobstorage | %{ $_.Primary }
$key2 = Get-AzureStorageKey yoursecondblobstorage | %{ $_.Primary }
$creds = Get-Credential
$oozieCreds = Get-Credential
$hiveCreds = Get-Credential
New-AzureHDInsightClusterConfig -ClusterSizeInNodes 4 `
| Set-AzureHDInsightDefaultStorage -StorageAccountName yourblobstorage.blob.core.windows.net
-StorageAccountKey $key1 -StorageContainerName "yourcontainer"
| Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 `
| Add-AzureHDInsightMetastore -SqlAzureServerName "yoursqlserver.database.windows.net" -DatabaseName "yourOozieDatabaseName" -Credential $oozieCreds -MetastoreType OozieMetastore `
| Add-AzureHDInsightMetastore -SqlAzureServerName "yoursqlserver.database.widows.net" -DatabaseName "yourHiveDatabaseName" -Credential $hiveCreds -MetastoreType HiveMetastore `
| New-AzureHDInsightCluster -Credential $creds