gpt4 book ai didi

hadoop - 无法使用 phoenix jdbc 驱动程序连接到 hbase(无法获取位置错误)

转载 作者:可可西里 更新时间:2023-11-01 15:55:47 26 4
gpt4 key购买 nike

我正在使用 phoenix(4.10.0-Hbase-1.2) 开发 hbase(1.2.6)。我收到此错误:

org.apache.hadoop.hbase.client.RetriesExhaustedException: Can't get the locations error

下面是我尝试使用 phoenix 连接到 hbase 的代码:

Connection connection = DriverManager.getConnection("jdbc:phoenix:localhost"); 

下面是我的 hdfs-site.xml 文件,我做了一些更改:
enter image description here

我需要做什么改变?请建议..

最佳答案

与@vrb 的综合回答

Zookeeper端口是非标准端口,需要在与Connection/DriverManager一起使用的jdbc url上指定

Connection connection = DriverManager.getConnection("jdbc:phoenix:localhost:12181");

关于hadoop - 无法使用 phoenix jdbc 驱动程序连接到 hbase(无法获取位置错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44565154/

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