Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-AzureHDInsightMetastore

Add-AzureHDInsightMetastore

microsoft.windowsazure.commands.hdinsight.dll

Synopsis

Adds a SQL Database account to the Microsoft Azure HDInsight cluster configuration.

Syntax

Add-AzureHDInsightMetastore [-Config] [-Credential] [-DatabaseName] [-MetastoreType] [-SqlAzureServerName] [<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 .7.2 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

0

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

-Credential <PSCredential>

Credentials to access SQL Database

Aliases

None

Required?

true

Position

3

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

2

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

5

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

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type


Return Type


Notes

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 &quot;yourcontainer&quot;     | Add-AzureHDInsightStorage -StorageAccountName yoursecondbobstorage.blob.core.windows.net -StorageAccountKey $key2 `    | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.windows.net&quot; -DatabaseName &quot;yourOozieDatabaseName&quot; -Credential $oozieCreds -MetastoreType OozieMetastore `    | Add-AzureHDInsightMetastore -SqlAzureServerName &quot;yoursqlserver.database.widows.net&quot; -DatabaseName &quot;yourHiveDatabaseName&quot; -Credential $hiveCreds -MetastoreType HiveMetastore  `    | New-AzureHDInsightCluster -Subscription $subid -Credential $creds

Online Version