Add-AzureHDInsightStorage
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Add-AzureHDInsightStorage
Adds a Windows Azure Blob Storage account entry to a target HDInsight configuration.
Syntax
Parameter Set: Add Storage Account
Add-AzureHDInsightStorage [-Config] <AzureHDInsightConfig> [-StorageAccountName] <String> [-StorageAccountKey] <String> [ <CommonParameters>]
Detailed Description
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 target configuration to which storage account information is added.
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 storage account that is being added to the target configuration.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-StorageAccountName<String>
Aliases |
none |
Required? |
true |
Position? |
2 |
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
PS C:\>
Add storage
Add a storage account.
PS C:\> $storeconfig = Add-AzureHDInsightStorage -Config $config -StorageAccountName name -StorageAccountKey key
Configure storage accounts and access.
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 -Subscription $subid -Credential $creds