Add-AzureHDInsightMetastore
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Add-AzureHDInsightMetastore
Adds a SQL Database account to the Windows Azure HDInsight cluster configuration.
Syntax
Parameter Set: Add Metastore
Add-AzureHDInsightMetastore [-Config] <AzureHDInsightConfig> [-SqlAzureServerName] <String> [-DatabaseName] <String> [-Credential] <PSCredential> [-MetastoreType] <AzureHDInsightMetastoreType> [ <CommonParameters>]
Detailed Description
Adds a SQL Database to the HDInsight configuration created by the New-AzureHDInsightClusterConfig cmdlet. The database is used to store Hive and/or Oozie metadata.
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 to which metastore information is added.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue) |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
Credentials to access SQL Database
Aliases |
none |
Required? |
true |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-DatabaseName<String>
The name of the database that will store the Hive or Oozie metadata.
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-MetastoreType<AzureHDInsightMetastoreType>
The metastore type: HiveMetaStore if storing Hive metadata; OozieMetaStore if storing Oozie metadata.
Aliases |
none |
Required? |
true |
Position? |
6 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-SqlAzureServerName<String>
The fully qualified domain name (FQDN) of the SQL Database server that contains the database used to store the Hive or Oozie metadata.
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
Add a metastore
Add a SQL database to serve as a metastore for an HDInsight cluster.
PS C:\> $metaconfig = Add-AzureHDInsightMetastore -Config $config -SqlAzureServerName servername -DatabaseName dbname –Credential (Get-Credential) -MetastoreType HiveMetastore
Configure storage
Configure storage and add metastore.
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-CredentialNew-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