配置单元/Hbase集成:配置问题

配置单元/Hbase集成:配置问题,hbase,hive,apache-zookeeper,Hbase,Hive,Apache Zookeeper,我试图从使用thrift/hbase放置在那里的HDF中提取数据到配置单元表中,但我正在努力找到以下错误消息的解决方案 ERROR client.HConnectionManager$HConnectionImplementation (HConnectionManager.java:checkIfBaseNodeAvailable(751)) – Check the value configured in ‘zookeeper.znode.parent’. There could be a

我试图从使用thrift/hbase放置在那里的HDF中提取数据到配置单元表中,但我正在努力找到以下错误消息的解决方案

ERROR client.HConnectionManager$HConnectionImplementation (HConnectionManager.java:checkIfBaseNodeAvailable(751)) 
– Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
其次是

FAILED: Error in metadata: MetaException(message:org.apache.hadoop.hbase.MasterNotRunningException
从配置单元终端运行以下查询后,这些错误出现在配置单元日志中

create external table d_table (id bigint, date string) 
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler’ 
with serdeproperties (“hbase.columns.mapping” = “:key,a:date”) 
TBLPROPERTIES (“hbase.table.name” = “demo_table”);
该表已存在、已填充并且可以从hbase外壳中找到,我已检查HMASTER进程是否正在运行。“zookeeper.znode.parent”被设置为默认值,hbase接受这一点(如果更改,hbase会抱怨,因此我很有信心它是正确的)。我能够建立一个ZK客户端没有问题

在研究这个问题时,我被告知解决方案是根据我使用的HBase版本重新编译配置单元,这有点违背了使用发行版的意义。ZK和HBase主机与我运行HiveQL命令的机器在同一台机器上

如果我从另一台机器上运行查询,我会看到以下内容:

ERROR client.HConnectionManager$HConnectionImplementation 
(HConnectionManager.java:checkIfBaseNodeAvailable(751)) 
– Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.

WARN zookeeper.ClientCnxn (ClientCnxn.java:run(1089)) 
– Session 0×0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
WARN zookeeper.RecoverableZooKeeper (RecoverableZooKeeper.java:retryOrThrow(219)) 
– Possibly transient ZooKeeper exception: 
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss for /hbase/hbaseid
如果我在zookeeper.quorum的hive-site.xml文件中添加一个属性,就会得到与第一台机器相同的行为。我已从Ambari获取zookeeper.quorum的值

我使用的是Hortonworks发行版1.3。我们已经成功地使用HCatalog运行Hive来创建表等,并且我们还运行了各种其他场景。如果需要更多信息来帮助,请告诉我,我想保持这篇文章的整洁


提前感谢

您可以查看zookeeper服务端口。我不确定您是否正在使用独立的zookeeper群集。否则,其他进程可能已占用端口2181,hbase将尝试使用端口2182启动zookeeper。如果服务端口不是2181,Hive将抱怨没有特定配置。

我在java中与Hbase通信时遇到了相同的错误。 当我添加以下conf时,它得到了解决

conf.set("zookeeper.znode.parent", "/hbase-unsecure");
希望有帮助