我试图用hive元存储创建hdinsight集群。已成功创建群集,但没有配置单元元存储。也没有返回任何错误。我使用了下面的powershell脚本。
$resourceGroupName = "ResourceGroup"
$storageAccountName = "myStorage"
$containerName="myContainer"
$clusterName = "myCluster"
$location = "West Europe"
$clusterNodes = 2
$clusterType = "Hadoop"
$OSType = "Windows"
$hdVersion = "3.2"
$hadoopUserName = "user"
$hadoopUserPassword = "password"
$hadoopUserPW = ConvertTo-SecureString -String $hadoopUserPassword -AsPlainText -Force
$clusterCreds = New-Object System.Management.Automation.PSCredential($hadoopUserName,$hadoopUserPW)
$sqlDatabaseServerName = "mydbserver"
$metaStoreDBName = "HiveMetaStoreDB"
$sqlDatabaseLogin = "myDBLogin"
$sqlDatabasePassword = "myDBPassword"
$sqlDatabaseSecurePassword = ConvertTo-SecureString -String $sqlDatabasePassword -AsPlainText -Force
$sqlServerCred = New-Object System.Management.Automation.PSCredential ($sqlDatabaseLogin, $sqlDatabaseSecurePassword)
# Create a new HDInsight cluster
$config = New-AzureRmHDInsightClusterConfig -ClusterType Hadoop `
| Add-AzureRmHDInsightMetastore `
-SqlAzureServerName "$sqlDatabaseServerName.database.windows.net" `
-DatabaseName $metaStoreDBName `
-Credential $sqlServerCred `
-MetastoreType HiveMetastore
$config.DefaultStorageAccountName = "$storageAccountName.blob.core.windows.net"
$config.DefaultStorageAccountKey = $storageAccountKey
New-AzureRmHDInsightCluster `
-config $config `
-OSType $OSType `
-clustername $clusterName `
-HttpCredential $clusterCreds `
-DefaultStorageContainer $containerName `
-Location $location `
-ResourceGroupName $resourceGroupName `
-ClusterSizeInNodes $clusterNodes `
-Version $hdVersion
有人能告诉我为什么没有创建Hive元存储吗?或者我该怎么做才能创造它?
1条答案
按热度按时间xvw2m8pv1#
群集创建过程不会为您创建azure数据库。必须先创建数据库,然后才能将其用作配置单元元存储。