【问题标题】:How to use GlueMetaStore with spark.sql in JupyterHub如何在 JupyterHub 中使用 GlueMetaStore 和 spark.sql
【发布时间】:2019-02-15 23:00:15
【问题描述】:

我想将 GlueMetaStore 与 spark.sql 一起使用。

为此,我配置了 EMR-Cluster (5.16) 并设置了以下配置:

{
    "Classification":"hive-site",
    "ConfigurationProperties":
    {
        "hive.metastore.client.factory.class":"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory"
    },
    "Configurations":[]
},
{
    "Classification":"spark-hive-site",
    "ConfigurationProperties":
    {
            "hive.metastore.client.factory.class":"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory"
    },
    "Configurations":[]
}

我使用 spark-core 查询 JupyterHub 中的数据库,但我只得到了默认数据库,它是空的。当它工作时应该有更多的数据库。

我是否需要 enbaleHiveSupport 或类似的东西才能使连接正常工作,如果是,我该如何在 JupterHub 中设置它,因为上下文已经加载?

【问题讨论】:

    标签: apache-spark-sql amazon-emr aws-glue jupyterhub


    【解决方案1】:

    我找到了解决办法

    我需要在主节点上编辑“/etc/livy/conf.dist/livy.conf” 并添加

    livy.repl.enableHiveContext = true
    

    给它。

    重启livy服务器:

    sudo stop livy-server
    sudo startlivy-server
    

    重启内核就可以了!

    【讨论】:

      猜你喜欢
      • 2020-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-27
      • 2021-08-15
      • 2021-12-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多