在为EMR Studio 创建的 EMR On EKS 管理Endpoint 上集成Glue Catalog

0

【以下的问题经过翻译处理】 EMR Studio中,将EMR Virtual集群附加到Notebook时,无法访问Glue目录。尝试访问Glue时可能会出现一些常见的错误,其中包括:

  1. “Hive support is required to ...”
  2. “Table or view not found…”

将enableHiveSupport()添加到Spark语句中似乎也不起作用。例如:

spark = SparkSession \
    .builder \
    .appName("Python Spark SQL Hive integration example") \
    .enableHiveSupport() \
    .getOrCreate()

连接Notebook kernel 时需要哪些配置才能使Glue Catalog 可供Notebook本访问?

profile picture
专家
已提问 5 个月前27 查看次数
1 回答
0

【以下的回答经过翻译处理】 为了让EMR Studio连接到EMR on EKS,需要创建一个托管端点。此托管端点需要配置使用Hive作为Catalog , 并指向Glue。使用以下CLI来配置托管端点,该端点能够连接到Glue作为目录:

aws emr-containers create-managed-endpoint \
--type JUPYTER_ENTERPRISE_GATEWAY \
--virtual-cluster-id ${virtclusterid} \
--name virtual-emr-endpoint \
--execution-role-arn ${role_arn} \
--release-label ${emr_release_label} \
--certificate-arn ${certarn} \
--region ${region} \
--configuration-overrides '{
    "applicationConfiguration": [
      {
        "classification": "spark-defaults",
        "properties": {
          "spark.hadoop.hive.metastore.client.factory.class": "com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory",
          "spark.sql.catalogImplementation": "hive"
        }
      }
    ]
  }'

有关各种标志和描述的详细信息,请参见以下文档:https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-studio-create-eks-cluster.html

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则