< Back
Add-AzureRmHDInsightMetastore
Post
NAME Add-AzureRmHDInsightMetastore
SYNOPSIS
Adds a SQL Database to serve as a Hive or Oozie metastore to a cluster configuration object.
SYNTAX
Add-AzureRmHDInsightMetastore [-Config] <AzureHDInsightConfig> [-MetastoreType] {HiveMetastore | OozieMetastore} [-SqlAzureServerName] <String>
[-DatabaseName] <String> [-Credential] <PSCredential> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmHDInsightMetastore cmdlet adds a Hive or Oozie metastore to the HDInsight configuration object created by the
New-AzureRmHDInsightClusterConfig cmdlet. A metastore is a SQL Database that can used to store metadata for Hive, Oozie, or both.
PARAMETERS
-Config <AzureHDInsightConfig>
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the
New-AzureRmHDInsightClusterConfig cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Credential <PSCredential>
Specifies the credentials to use for the AzureSQL Server database.
Required? true
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DatabaseName <String>
Specifies the database on the AzureSQL Server instance to use for this metastore.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MetastoreType <AzureHDInsightMetastoreType>
Specifies the type of metastore. Possible values are HiveMetastore or OozieMetastore.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SqlAzureServerName <String>
Specifies the AzureSQL Server instance to use for this metastore.
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
AzureHDInsightConfig
Parameter 'Config' accepts value of type 'AzureHDInsightConfig' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
NOTES
Example 1: Add a SQL database metastore to the cluster configuration object
PS C:\\># Primary storage account info
PS C:\\> $storageAccountResourceGroupName = "Group"
PS C:\\> $storageAccountName = "yourstorageacct001"
PS C:\\> $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
PS C:\\> $storageContainer = "container001"
# Cluster configuration info
PS C:\\> $location = "East US 2"
PS C:\\> $clusterResourceGroupName = "Group"
PS C:\\> $clusterName = "your-hadoop-001"
PS C:\\> $clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzureRmResourceGroup -Name $clusterResourceGroupName -Location $location
# Hive metastore info
PS C:\\> $hiveSqlServer = "your-sqlserver-001"
PS C:\\> $hiveDb = "your-sqldb-001"
PS C:\\> $hiveCreds = Get-Credential
# Oozie metastore info
PS C:\\> $oozieSqlServer = "your-sqlserver-001"
PS C:\\> $oozieDb = "your-sqldb-002"
PS C:\\> $oozieCreds = Get-Credential
# Create the cluster
PS C:\\> New-AzureRmHDInsightClusterConfig `
| Add-AzureRmHDInsightMetastore `
-SqlAzureServerName "$oozieSqlServer.database.contoso.net" `
-DatabaseName $oozieDb `
-Credential $oozieCreds `
-MetastoreType OozieMetastore `
| Add-AzureRmHDInsightMetastore `
-SqlAzureServerName "$hiveSqlServer.database.contoso.net" `
-DatabaseName $hiveDb `
-Credential $hiveCreds `
-MetastoreType HiveMetastore `
| New-AzureRmHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer
This command adds a SQL database metastore to the cluster named your-hadoop-001.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tmetastore
New-AzureRmHDInsightClusterConfig
SYNOPSIS
Adds a SQL Database to serve as a Hive or Oozie metastore to a cluster configuration object.
SYNTAX
Add-AzureRmHDInsightMetastore [-Config] <AzureHDInsightConfig> [-MetastoreType] {HiveMetastore | OozieMetastore} [-SqlAzureServerName] <String>
[-DatabaseName] <String> [-Credential] <PSCredential> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
DESCRIPTION
The Add-AzureRmHDInsightMetastore cmdlet adds a Hive or Oozie metastore to the HDInsight configuration object created by the
New-AzureRmHDInsightClusterConfig cmdlet. A metastore is a SQL Database that can used to store metadata for Hive, Oozie, or both.
PARAMETERS
-Config <AzureHDInsightConfig>
Specifies the HDInsight cluster configuration object that this cmdlet modifies. This object is created by the
New-AzureRmHDInsightClusterConfig cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Credential <PSCredential>
Specifies the credentials to use for the AzureSQL Server database.
Required? true
Position? 4
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DatabaseName <String>
Specifies the database on the AzureSQL Server instance to use for this metastore.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MetastoreType <AzureHDInsightMetastoreType>
Specifies the type of metastore. Possible values are HiveMetastore or OozieMetastore.
Required? true
Position? 1
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SqlAzureServerName <String>
Specifies the AzureSQL Server instance to use for this metastore.
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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
AzureHDInsightConfig
Parameter 'Config' accepts value of type 'AzureHDInsightConfig' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.HDInsight.Models.AzureHDInsightConfig
NOTES
Example 1: Add a SQL database metastore to the cluster configuration object
PS C:\\># Primary storage account info
PS C:\\> $storageAccountResourceGroupName = "Group"
PS C:\\> $storageAccountName = "yourstorageacct001"
PS C:\\> $storageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $storageAccountResourceGroupName -Name $storageAccountName)[0].value
PS C:\\> $storageContainer = "container001"
# Cluster configuration info
PS C:\\> $location = "East US 2"
PS C:\\> $clusterResourceGroupName = "Group"
PS C:\\> $clusterName = "your-hadoop-001"
PS C:\\> $clusterCreds = Get-Credential
# If the cluster's resource group doesn't exist yet, run:
# New-AzureRmResourceGroup -Name $clusterResourceGroupName -Location $location
# Hive metastore info
PS C:\\> $hiveSqlServer = "your-sqlserver-001"
PS C:\\> $hiveDb = "your-sqldb-001"
PS C:\\> $hiveCreds = Get-Credential
# Oozie metastore info
PS C:\\> $oozieSqlServer = "your-sqlserver-001"
PS C:\\> $oozieDb = "your-sqldb-002"
PS C:\\> $oozieCreds = Get-Credential
# Create the cluster
PS C:\\> New-AzureRmHDInsightClusterConfig `
| Add-AzureRmHDInsightMetastore `
-SqlAzureServerName "$oozieSqlServer.database.contoso.net" `
-DatabaseName $oozieDb `
-Credential $oozieCreds `
-MetastoreType OozieMetastore `
| Add-AzureRmHDInsightMetastore `
-SqlAzureServerName "$hiveSqlServer.database.contoso.net" `
-DatabaseName $hiveDb `
-Credential $hiveCreds `
-MetastoreType HiveMetastore `
| New-AzureRmHDInsightCluster `
-ClusterType Hadoop `
-OSType Windows `
-ClusterSizeInNodes 4 `
-ResourceGroupName $clusterResourceGroupName `
-ClusterName $clusterName `
-HttpCredential $clusterCreds `
-Location $location `
-DefaultStorageAccountName "$storageAccountName.blob.core.contoso.net" `
-DefaultStorageAccountKey $storageAccountKey `
-DefaultStorageContainer $storageContainer
This command adds a SQL database metastore to the cluster named your-hadoop-001.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... tmetastore
New-AzureRmHDInsightClusterConfig