如何在JupyterHub中将GlueMetaStore与spark.sql一起使用

时间:2018-09-11 12:27:44

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

我想将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中进行设置?

1 个答案:

答案 0 :(得分:0)

我找到了解决方法

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

livy.repl.enableHiveContext = true

对此。

重新启动livy-server:

sudo stop livy-server
sudo startlivy-server

重启内核就可以了!