为 spark thrift 服务器提供仓库目录的路径 [英] Giving spark thrift server the path to warehouse directory

查看:21
本文介绍了为 spark thrift 服务器提供仓库目录的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了我的 Spark 集群,并且我成功地通过 Spark SQL 连接器连接了 Tableau.

I have setup my spark cluster and I am successful in connecting Tableau through Spark SQL connector.

我从 spark shell 创建了我的表,并使用 (saveAsTable) 从 MySQL 保存了数据帧.

I created my tables from spark shell and saved dataframes from MySQL using (saveAsTable).

如何访问我从 Tableau 中保存的表格?启动spark thrift服务器时需要给出仓库目录的路径吗?如果是,如何进行,如果否,如何进行?

How can I access the tables that I have saved from Tableau? Do I need to give a path of the warehouse directory when starting the spark thrift server? If yes, how it can be done and if no, how can this be done?

推荐答案

确保您指向 spark-shell同一个元存储,并且thriftserver

Make sure you are pointing to the same metastore for spark-shell and thriftserver

Metastore 共享可以有两种方式,简单来说

Metastore sharing can be 2 ways, in simple

  1. 从同一位置启动 shell 和 thrift
  2. 为 Metastore 设置远程数据库

您可以使用 --hiveconf 将 hive confs 传递给 Spark thrift 服务器,使用 --conf

You can pass hive confs to Spark thrift server with --hiveconf and Spark confs with --conf

./sbin/start-thriftserver.sh \
  --conf spark.sql.warehouse.dir=path/to/warehouse/dir \
  --hiveconf hive.server2.thrift.port=<listening-port> \
  --hiveconf hive.server2.thrift.bind.host=<listening-host> \
  --master <master-uri>
  ...

这篇关于为 spark thrift 服务器提供仓库目录的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆