4

编辑:我能够让它工作。我创建了一个教程来展示如何: http ://www.dreamsyssoft.com/blog/blog.php?/archives/5-How-to-use-HBase-Hadoop-Clustered.html

当我设置 hbase-site.xml 属性时,我可以让 HBase 正常工作:

<name>hbase.rootdir</name>
<value>file:///app/hbase/hbase/</value>

这工作得很好,它按预期将数据存储在目录中,但是我希望它现在连接到我正在运行的 hadoop 实例,而不是使用本地文件。我把它设置为

<value>hdfs://localhost:9000/</value>

而不是本地文件,它将不起作用。我需要在 hadoop 端做一些额外的配置来支持这个吗?Hadoop 正在运行并使用端口 9000。

这是我来自 hadoop 的 core-site.xml:

<configuration>
        <property>
                <name>fs.default.name</name>
                <value>hdfs://localhost:9000</value>
        </property>
</configuration>

这也是尝试在 hbase shell 中执行“列表”时出现的错误:

hbase(main):001:0> list
TABLE
12/06/28 15:26:29 ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries
12/06/28 15:26:29 WARN zookeeper.ZKUtil: hconnection Unable to set watcher on znode /hbase/master
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1021)
        at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:154)
        at org.apache.hadoop.hbase.zookeeper.ZKUtil.watchAndCheckExists(ZKUtil.java:226)
        at org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker.start(ZooKeeperNodeTracker.java:76)
        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.setupZookeeperTrackers(HConnectionManager.java:580)
        at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:569)
        at org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:186)
        at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:98)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.jruby.javasupport.JavaConstructor.newInstanceDirect(JavaConstructor.java:275)
        at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:91)
        at org.jruby.java.invokers.ConstructorInvoker.call(ConstructorInvoker.java:178)
4

3 回答 3

0

我使用了http://hbase.apache.org/book.html#zookeeper中建议的配置 stop Ipatables 并以 root 模式启动 hbase。

于 2012-09-28T15:31:04.113 回答
0

可能存在兼容性问题,请检查http://rajkrrsingh.blogspot.in/2013/11/hbase-compatibility-with-hadoop-2x.html

于 2013-11-24T12:56:00.047 回答
0

我相信 Hbase 找不到 zookeeper quorum,你必须在 hbase-site.xml 中设置 hbase.zookeeper.quorum 属性。还要检查类路径是否设置正确,请查看此文档

http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/mapreduce/package-summary.html#classpath

于 2012-09-03T03:00:34.320 回答