gpt4 book ai didi

apache-spark - 为 spark thrift 服务器提供仓库目录的路径

转载 作者:行者123 更新时间:2023-12-04 05:22:26 25 4
gpt4 key购买 nike

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

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

如何访问我从 Tableau 保存的表格?启动spark thrift server时是否需要给出仓库目录的路径?如果是,如何完成,如果否,如何完成?

最佳答案

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

Metastore sharing can be 2 ways, in simple

  1. Starting both shell and thrift from same location
  2. Setting up remote database for metastore

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

将 Spark confs 传递给 Spark thrift 服务器
./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>
...

关于apache-spark - 为 spark thrift 服务器提供仓库目录的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45032770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com