hbaseZookeeper

vohkndzv  于 2021-06-10  发布在  Hbase
关注(0)|答案(5)|浏览(362)

我是hbase的新手,正在尝试在ubuntu14.04上配置hbase。在配置和启动hbase(以访问hbase cli)之后。如果我运行任何hbase命令,就会得到节点 /hbase 不在zookeeper中。请在我的下面找到 hbase-site.xml 以及 zoo.cfg .

<configuration>
     <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost/hbase</value>
   <description>Enter the HBase NameNode server hostname</description>
  </property>

  <property>
       <name>hbase.cluster.distributed</name>
       <value>true</value>
    </property>

   <property>
     <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
  <description> The port at which the clients will connect.
  </description>
   </property>

   <property> 
     <name>hbase.master.port</name>
     <value>2080</value>
    <description>The port the HBase Master should bind to.</description>
   </property>

   <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>

    </property>

    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/var/lib/zookeeper</value>
      <description>Property from ZooKeeper's config zoo.cfg.
      The directory where the snapshot is stored.
       </description>
    </property>

    <property>
    <name>zookeeper.znode.parent</name>
    <value>/hbase</value>
    </property>

 </configuration>

动物园.cfg

dataDir=/var/lib/zookeeper
server.1=localhost:2888:3888

提前感谢您的帮助/支持。

7nbnzgx9

7nbnzgx91#

<dependency>
         <groupId>org.apache.hbase</groupId>
         <artifactId>hbase</artifactId>
         <version>3.0.0-SNAPSHOT</version>
         <type>pom</type>
    </dependency>
apeeds0o

apeeds0o2#

这是我的hbase-site.xml,希望对您有所帮助:

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
 <configuration>
    <property>
      <name>hbase.rootdir</name>
      <value>hdfs://localhost:54310/hbase</value>
    </property>

    <property>
      <name>hbase.cluster.distributed</name>
      <value>true</value>
    </property>

    <property>
      <name>hbase.zookeeper.quorum</name>
      <value>localhost</value>
    </property>

    <property>
      <name>hbase.master</name>
      <value>localhost:60000</value>
    </property>

    <property>
      <name>hbase.zookeeper.property.dataDir</name>
      <value>/usr/local/hadoop/zookeeper</value>
  </property>

  <property>
      <name>hbase.zookeeper.property.clientPort</name>
      <value>2181</value>
  </property>

  </configuration>
nx7onnlm

nx7onnlm3#

在我的例子中,我不得不在hadoop-env.sh中为hbase/lib添加类路径。添加hbase类路径解决了我的问题。问候阿尼尔·基亚尼

h9vpoimq

h9vpoimq4#

改变 zookeeper.znode.parent 属性值到 /hbase-unsecure 让我知道

<property>
  <name>zookeeper.znode.parent</name>
  <value>/hbase-unsecure</value>
</property>
a0x5cqrl

a0x5cqrl5#

是否在hbase-site.xml中设置了hbase.zookeeper.quorum,如下所示:

<property>
     <name>hbase.zookeeper.quorum</name>
     <value>your_zookeeper_url:2181</value> 
 </property>

相关问题