• 安装伪分布式hbase 0.99.0


    查看是否启动成功,输入jps,看到有HMaster和HQuorumPeer,浏览器输入http://localhost:16030/master-status,能打开说明成功

    复制代码
    hbase(main):001:0> lcc@lcc-HP-Pro-3380-MT:~$ jps
    28522 NodeManager
    817 Jps
    27997 DataNode
    28206 SecondaryNameNode
    386 HMaster
    28380 ResourceManager
    27823 NameNode
    300 HQuorumPeer
    复制代码

    查看端口被哪些进程占用

    netstat -pan | grep 16020

    安装后因为看到没有HregionServer这个进程,还以为启动不对,就手动启动它

    bin/hbase-daemon.sh start regionserver

    但是这个命令总是启动不成功,查看日志发现,总是提示端口被占用lem binding to localhost/127.0.0.1:16020 : Address already in use: bind

    然后查看被哪个进程占用,发现有好几个,不知道为啥,然后发现了

    1. Start and stop additional RegionServers

      The HRegionServer manages the data in its StoreFiles as directed by the HMaster. Generally, one HRegionServer runs per node in the cluster. Running multiple HRegionServers on the same system can be useful for testing in pseudo-distributed mode. The local-regionservers.sh command allows you to run multiple RegionServers. It works in a similar way to the local-master-backup.sh command, in that each parameter you provide represents the port offset for an instance. Each RegionServer requires two ports, and the default ports are 16020 and 16030. However, the base ports for additional RegionServers are not the default ports since the default ports are used by the HMaster, which is also a RegionServer since HBase version 1.0.0. The base ports are 16200 and 16300 instead. You can run 99 additional RegionServers that are not a HMaster or backup HMaster, on a server. The following command starts four additional RegionServers, running on sequential ports starting at 16202/16302 (base ports 16200/16300 plus 2).

      $ .bin/local-regionservers.sh start 2 3 4 5            
                

      To stop a RegionServer manually, use the local-regionservers.sh command with the stop parameter and the offset of the server to stop.

      $ .bin/local-regionservers.sh stop 3

    大概意思是,HMaster占用了16020这个端口,那么再用bin/hbase-daemon.sh start regionserver启动HRegionServer时候,肯定会报错,所以换用下面命令启动时,就没问题了

    .bin/local-regionservers.sh start 2 3 4 5
  • 相关阅读:
    自介
    打招呼
    试验四
    作业:实验二
    个人简介
    实验4
    构建之法—心得体会
    作业:实验二
    个人简介
    软件测试第四次博客作业2
  • 原文地址:https://www.cnblogs.com/Gingber/p/4631216.html
Copyright © 2020-2023  润新知