擬似分布hbase 0.99をインストールする.0

2729 ワード

起動に成功したかどうかを確認し、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
そしてどのプロセスに占有されているかを見て、いくつか発見して、なぜか分からないで、それから発見しました
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