Add-AzureRmHDInsightMetastore
클러스터 구성 개체에 Hive 또는 Oozie 메타스토어 역할을 하는 SQL Database를 추가합니다.
Warning
AzureRM PowerShell 모듈은 2024년 2월 29일부터 공식적으로 사용되지 않습니다. 사용자는 지속적인 지원 및 업데이트를 보장하기 위해 AzureRM에서 Az PowerShell 모듈로 마이그레이션하는 것이 좋습니다.
AzureRM 모듈은 여전히 작동할 수 있지만 더 이상 기본 또는 지원되지 않으므로 사용자의 재량에 따라 계속 사용할 수 있습니다. Az 모듈로 전환하는 방법에 대한 지침은 마이그레이션 리소스를 참조하세요.
Syntax
Add-AzureRmHDInsightMetastore
[-Config] <AzureHDInsightConfig>
[-MetastoreType] <AzureHDInsightMetastoreType>
[-SqlAzureServerName] <String>
[-DatabaseName] <String>
[-Credential] <PSCredential>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Add-AzureRmHDInsightMetastore cmdlet은 New-AzureRmHDInsightClusterConfig cmdlet에서 만든 HDInsight 구성 개체에 Hive 또는 Oozie 메타스토어를 추가합니다. 메타스토어는 Hive, Oozie 또는 둘 다에 대한 메타데이터를 저장하는 데 사용할 수 있는 SQL Database입니다.
예제
예제 1: 클러스터 구성 개체에 SQL Database 메타스토어 추가
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
이 명령은 hadoop-001이라는 클러스터에 SQL 데이터베이스 메타스토어를 추가합니다.
매개 변수
-Config
이 cmdlet에서 수정하는 HDInsight 클러스터 구성 개체를 지정합니다. 이 개체는 New-AzureRmHDInsightClusterConfig cmdlet에 의해 생성됩니다.
Type: | AzureHDInsightConfig |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Credential
AzureSQL 서버 데이터베이스에 사용할 자격 증명을 지정합니다.
Type: | PSCredential |
Position: | 4 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DatabaseName
이 메타스토어에 사용할 AzureSQL 서버 인스턴스의 데이터베이스를 지정합니다.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure와의 통신에 사용되는 자격 증명, 계정, 테넌트 및 구독
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MetastoreType
메타스토어의 형식을 지정합니다. 가능한 값은 HiveMetastore 또는 OozieMetastore입니다.
Type: | AzureHDInsightMetastoreType |
Accepted values: | HiveMetastore, OozieMetastore |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SqlAzureServerName
이 메타스토어에 사용할 AzureSQL 서버 인스턴스를 지정합니다.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
입력
매개 변수: 구성(ByValue)