分享

spark2.X 访问不到hive 数据库,求帮忙

JQKA2 2018-8-23 19:03:49 发表于 疑问解答 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 5885
我已经把hive-site.xml 扔到resource下面了


已有(4)人评论

跳转到指定楼层
jixianqiuxue 发表于 2018-8-23 19:44:26
很多都出现这种情况。可以把hive的配置写到代码中,特别是远程连接url配置。
回复

使用道具 举报

jixianqiuxue 发表于 2018-8-24 10:17:32
我也是遇到这个问题的,配置文件是可能读取不到的,代码里面设置下下面问题就解决了
<property>

          <name>hive.metastore.uris</name>

          <value>thrift://hadoop1:9083</value>

          <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>

        </property>

回复

使用道具 举报

BIGME 发表于 2018-8-24 11:20:08
hadoop的 core-site.xml也拷贝了把
回复

使用道具 举报

Tesla 发表于 2018-9-13 15:14:41
应该是放在 conf目录下啊
/home/xxx/clouds/soft/spark-2.3.1/conf
[xxx@02 conf]$ ll
total 36
-rw-rw-r-- 1 ctu ctu  996 Jun  2 04:49 docker.properties.template
-rw-rw-r-- 1 ctu ctu 1105 Jun  2 04:49 fairscheduler.xml.template
lrwxrwxrwx 1 ctu ctu   51 Sep  7 17:38 hive-site.xml -> /home/xxx/clouds/soft/hive-1.2.2/conf/hive-site.xml
-rw-rw-r-- 1 ctu ctu 2025 Jun  2 04:49 log4j.properties.template
-rw-rw-r-- 1 ctu ctu 7801 Jun  2 04:49 metrics.properties.template
-rw-rw-r-- 1 ctu ctu   54 Sep  7 16:15 slaves
-rw-rw-r-- 1 ctu ctu 1326 Sep  7 17:25 spark-defaults.conf
-rwxrwxr-x 1 ctu ctu 4667 Sep  7 17:33 spark-env.sh
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条