6

我使用 ./start-hbase.sh 启动了 HBase。我做了 ./hbase shell 来启动 Hbase 的 shell。问题是我无法创建新表。

$ ./hbase shell 
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.92.1, r1298924, Fri Mar  9 16:58:34 UTC 2012

hbase(main):001:0> create 'test','cf'

它永远保持这种状态。有人可以帮忙吗?

谢谢

4

4 回答 4

9

你的 HMaster 没有启动。

1.请检查您的 Hmaster 日志。
如果您在日志中看到类似的内容。
INFO org.apache.hadoop.hbase.util.FSUtils: Waiting for dfs to exit safe mode...
然后使用以下命令将 hadoop 从安全模式中退出。
hadoop dfsadmin -safemode leave

2.如果你看到 localhost 不接受或 zookeeper 不接受。然后,请修改 /etc/hosts 和 /etc/hostname 文件。

删除行 127.0.1.1 localhost
你的 /etc/hosts 文件应该是这样的

127.0.0.1       hadoop
192.165.1.45    hadoop  hbase

您的 /etc/hostname 文件应如下所示

hadoop

于 2012-06-06T07:17:47.013 回答
2

您必须检查 Hmaster 日志,检查 hbase-site.xml 文件中的hbase.rootdirhbase.zookeeper.quorum参数。这通常发生在 Hbase 无法连接到 Zookeeper quorum 时。

于 2012-04-19T21:49:39.747 回答
0

另外,编辑/etc/hosts如果你想作为 HBase 的客户端连接,你必须写 IP 和主机名。

例如,HBase 在 192.168.xx.xx 中运行,但您的应用在 192.168.xx.yy 中运行

编辑/etc/hosts添加以下行

 192.168.xx.yy <hostname>
于 2018-10-09T14:30:10.267 回答
0

如果以下命令不起作用

$ hadoop dfsadmin -safemode leave

然后尝试

$ hdfs dfsadmin -safemode forceExit

这对我有用!

于 2020-05-20T22:53:29.240 回答