get "ERROR: Can't get master address from ZooKeeper;znode 数据 == 空"使用 Hbase shell 时 [英] get "ERROR: Can't get master address from ZooKeeper; znode data == null" when using Hbase shell

查看:17
本文介绍了get "ERROR: Can't get master address from ZooKeeper;znode 数据 == 空"使用 Hbase shell 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 Hadoop2.2.0 和 Hbase0.98.0,这就是我要做的:

$ ./bin/start-hbase.sh$ ./bin/hbase 外壳2.0.0-p353 :001 >列表

然后我得到了这个:

ERROR: Can't get master address from ZooKeeper;znode 数据 == 空

为什么我会收到这个错误?另一个问题:我需要在运行 base 之前运行 ./sbin/start-dfs.sh./sbin/start-yarn.sh 吗?

另外,./sbin/start-dfs.sh./sbin/start-yarn.sh 用于什么?

这是我的一些 conf 文档:

hbase-sites.xml

<预><代码><配置><财产><name>hbase.rootdir</name><value>hdfs://127.0.0.1:9000/hbase</value></属性><财产><name>hbase.cluster.distributed</name><值>真</值></属性><财产><name>hbase.tmp.dir</name><value>/Users/apple/Documents/tools/hbase-tmpdir/hbase-data</value></属性><财产><name>hbase.zookeeper.quorum</name><value>本地主机</value></属性><财产><name>hbase.zookeeper.property.dataDir</name><value>/Users/apple/Documents/tools/hbase-zookeeper/zookeeper</value></属性></配置>

核心站点.xml

<预><代码><配置><财产><name>fs.defaultFS</name><value>hdfs://localhost:9000</value><description>默认文件系统的名称.</description></属性><财产><name>hadoop.tmp.dir</name><value>/Users/micmiu/tmp/hadoop</value><description>其他临时目录的基础.</description></属性><财产><name>io.native.lib.available</name><value>false</value></属性></配置>

yarn-sites.xml

<预><代码><配置><财产><name>yarn.nodemanager.aux-services</name><value>mapreduce_shuffle</value></属性><财产><name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name><value>org.apache.hadoop.mapred.ShuffleHandler</value></属性></配置>

解决方案

如果您只想运行 HBase 而无需进入独立 HBase 的 Zookeeper 管理,那么从 中删除所有 property 块hbase-site.xml 除了名为 hbase.rootdir 的属性块.

现在运行 /bin/start-hbase.sh.HBase 带有自己的 Zookeeper,它会在您运行 /bin/start-hbase.sh 时启动,如果您是第一次尝试解决问题,它就足够了.稍后您可以为 Zookeeper 放置分布式模式配置.

你只需要运行/sbin/start-dfs.sh即可运行HBase,因为hbase.rootdir的值设置为hdfs://hbase-site.xml 中的 127.0.0.1:9000/hbase.如果您使用 file:///some_location_on_local_filesystem 将其更改为本地文件系统上的某个位置,那么您甚至不需要运行 /sbin/start-dfs.sh.

hdfs://127.0.0.1:9000/hbase 说它是 HDFS 上的一个地方,/sbin/start-dfs.sh 启动 namenode 和 datanode,提供底层访问 HDFS 文件系统的 API.关于 Yarn 的了解,请查看 http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/YARN.html.

I installed Hadoop2.2.0 and Hbase0.98.0 and here is what I do :

$ ./bin/start-hbase.sh 

$ ./bin/hbase shell

2.0.0-p353 :001 > list

then I got this:

ERROR: Can't get master address from ZooKeeper; znode data == null

Why am I getting this error ? Another question: do I need to run ./sbin/start-dfs.sh and ./sbin/start-yarn.sh before I run base ?

Also, what are used ./sbin/start-dfs.sh and ./sbin/start-yarn.sh for ?

Here is some of my conf doc :

hbase-sites.xml

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>hdfs://127.0.0.1:9000/hbase</value>
    </property>
    <property>
        <name>hbase.cluster.distributed</name>
        <value>true</value>
    </property>

    <property>
        <name>hbase.tmp.dir</name>
        <value>/Users/apple/Documents/tools/hbase-tmpdir/hbase-data</value>
    </property>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/Users/apple/Documents/tools/hbase-zookeeper/zookeeper</value>
    </property>
</configuration>

core-sites.xml

<configuration>

  <property>
      <name>fs.defaultFS</name>
      <value>hdfs://localhost:9000</value>
      <description>The name of the default file system.</description>
  </property>

  <property>
      <name>hadoop.tmp.dir</name>
      <value>/Users/micmiu/tmp/hadoop</value>
      <description>A base for other temporary directories.</description>
  </property>

  <property>
      <name>io.native.lib.available</name>
      <value>false</value>
  </property>

</configuration>

yarn-sites.xml

<configuration>

    <property>
        <name>yarn.nodemanager.aux-services</name>
        <value>mapreduce_shuffle</value>
    </property>

    <property>
        <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
        <value>org.apache.hadoop.mapred.ShuffleHandler</value>
    </property>

</configuration>

解决方案

If you just want to run HBase without going into Zookeeper management for standalone HBase, then remove all the property blocks from hbase-site.xml except the property block named hbase.rootdir.

Now run /bin/start-hbase.sh. HBase comes with its own Zookeeper, which gets started when you run /bin/start-hbase.sh, which will suffice if you are trying to get around things for the first time. Later you can put distributed mode configurations for Zookeeper.

You only need to run /sbin/start-dfs.sh for running HBase since the value of hbase.rootdir is set to hdfs://127.0.0.1:9000/hbase in your hbase-site.xml. If you change it to some location on local the filesystem using file:///some_location_on_local_filesystem, then you don't even need to run /sbin/start-dfs.sh.

hdfs://127.0.0.1:9000/hbase says it's a place on HDFS and /sbin/start-dfs.sh starts namenode and datanode which provides underlying API to access the HDFS file system. For knowing about Yarn, please look at http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/YARN.html.

这篇关于get &quot;ERROR: Can't get master address from ZooKeeper;znode 数据 == 空"使用 Hbase shell 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆