当前位置:   article > 正文

HBase伪分布式搭建_hbase伪分布式运行成功后,应该运行以下哪些进程(

hbase伪分布式运行成功后,应该运行以下哪些进程(

配置hbase-site.xml

在原有的hbase-site.xml配置的基础上增加以下配置,该配置指示HBase以分布式模式运行,每个HBase相关的进程都是单独的JVM实例:

<property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
</property>
  • 1
  • 2
  • 3
  • 4

然后需要设置hbase.unsafe.stream.capability.enforce为true,之前设置的false:

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:9000/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/usr/hadoop/hbase/zookeeper</value>
  </property>
  <property>
    <name>hbase.unsafe.stream.capability.enforce</name>
    <value>true</value> <!--需要更改这个位置为true--> 
    <description>
      Controls whether HBase will check for stream capabilities (hflush/hsync).

      Disable this if you intend to run on LocalFileSystem, denoted by a rootdir
      with the 'file://' scheme, but be mindful of the NOTE below.

      WARNING: Setting this to false blinds you to potential data loss and
      inconsistent system state in the event of process and/or node failures. If
      HBase is complaining of an inability to use hsync or hflush it's most
      likely not a false positive.
    </description>
  </property>
  <!--表示以分布式模式运行--> 
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
</configuration>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

HBase的进程

运行HBase

使用bin/start-hbase.sh命令运行HBase,运行成功后,使用jps命令查看到以下以H开头的JVM进场则代表HBase伪分布模式启动成功:

[root@VM_0_14_centos hbase-2.1.1]# jps
3034 NameNode
13093 HMaster
13168 HRegionServer
14668 Jps
3350 SecondaryNameNode
3152 DataNode
13030 HQuorumPeer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
查看在HDFS中的HBase目录
[root@VM_0_14_centos hbase-2.1.1]# /usr/hadoop/hadoop-2.8.5/bin/hadoop fs -ls /hbase
Found 14 items
drwxr-xr-x   - root supergroup          0 2019-01-02 14:58 /hbase/.hbck
drwxr-xr-x   - root supergroup          0 2019-01-02 15:43 /hbase/.tmp
drwxr-xr-x   - root supergroup          0 2019-01-02 15:43 /hbase/MasterProcWALs
drwxr-xr-x   - root supergroup          0 2019-01-02 15:43 /hbase/WALs
drwxr-xr-x   - root supergroup          0 2019-01-02 15:51 /hbase/archive
drwxr-xr-x   - root supergroup          0 2019-01-02 14:58 /hbase/corrupt
drwxr-xr-x   - root supergroup          0 2019-01-02 14:58 /hbase/data
drwxr-xr-x   - root supergroup          0 2019-01-02 15:04 /hbase/default
drwxr-xr-x   - root supergroup          0 2019-01-02 14:58 /hbase/hbase
-rw-r--r--   3 root supergroup         42 2019-01-02 14:58 /hbase/hbase.id
-rw-r--r--   3 root supergroup          7 2019-01-02 14:58 /hbase/hbase.version
drwxr-xr-x   - root supergroup          0 2019-01-02 14:58 /hbase/mobdir
drwxr-xr-x   - root supergroup          0 2019-01-02 15:53 /hbase/oldWALs
drwx--x--x   - root supergroup          0 2019-01-02 14:58 /hbase/staging
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号