使用 CLI 创建带有 glue catalog 的 EMR Hive 集群
Create EMR Hive cluster with glue catalog using CLI
我想创建 EMR Hive 集群,它将使用 Glue 作为数据目录,使用 AWS CLI。
我在 AWS docs 或在其他地方搜索都没有找到与此相关的内容。
这可能吗?
首先我们创建一个名为 emr.json 的 configuration classification,它指定 AWS Glue 数据目录作为 Hive 的元存储:
[
{
"Classification": "hive-site",
"Properties": {
"hive.metastore.client.factory.class": "com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory",
"hive.metastore.schema.verification": "false"
}
}
]
注意:在 EMR 版本 5.28.0、5.28.1 或 5.29.0 上,如果您使用 AWS Glue 数据目录作为元存储创建集群,我们将 hive.metastore.schema.verification 设置为假的。
最后,我们将配置分类文件与我们最终的命令结合起来,如下:
aws emr create-cluster --name "syumaK-cluster" --configurations file://emr.json --release-label emr-5.28.0 --use-default-roles --applications Name=Hadoop Name=Spark Name=Hive Name=HUE --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m1.medium InstanceGroupType=CORE,InstanceCount=2,InstanceType=m1.medium
回复:
{
"ClusterId": "j-2NZ6xxxxxx",
"ClusterArn": "arn:aws:elasticmapreduce:us-east-1:1925xxxxx:cluster/j-2NZ6xxxxxx"
}
希望对您有所帮助!
我想创建 EMR Hive 集群,它将使用 Glue 作为数据目录,使用 AWS CLI。
我在 AWS docs 或在其他地方搜索都没有找到与此相关的内容。
这可能吗?
首先我们创建一个名为 emr.json 的 configuration classification,它指定 AWS Glue 数据目录作为 Hive 的元存储:
[
{
"Classification": "hive-site",
"Properties": {
"hive.metastore.client.factory.class": "com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory",
"hive.metastore.schema.verification": "false"
}
}
]
注意:在 EMR 版本 5.28.0、5.28.1 或 5.29.0 上,如果您使用 AWS Glue 数据目录作为元存储创建集群,我们将 hive.metastore.schema.verification 设置为假的。
最后,我们将配置分类文件与我们最终的命令结合起来,如下:
aws emr create-cluster --name "syumaK-cluster" --configurations file://emr.json --release-label emr-5.28.0 --use-default-roles --applications Name=Hadoop Name=Spark Name=Hive Name=HUE --instance-groups InstanceGroupType=MASTER,InstanceCount=1,InstanceType=m1.medium InstanceGroupType=CORE,InstanceCount=2,InstanceType=m1.medium
回复:
{
"ClusterId": "j-2NZ6xxxxxx",
"ClusterArn": "arn:aws:elasticmapreduce:us-east-1:1925xxxxx:cluster/j-2NZ6xxxxxx"
}
希望对您有所帮助!