手机版
你好,游客 登录 注册
背景:
阅读新闻

HBase-0.90.4集群安装配置

[日期:2012-05-05] 来源:Linux社区  作者:shirdrn [字体:大 中 小]
4、配置Zookeeper集群
具体安装、配置和启动,详见文章 http://www.linuxidc.com/Linux/2012-05/59751.htm 的说明。
在开始启动HBase集群之前,要先启动Zookeeper集群,保证其运行正常。

5、启动HBase集群

启动HBase集群了,执行如下脚本:
  1. start-hbase.sh  
你可以使用jps查看一下,当前master上启动的全部进程,如下所示:
  1. Hadoop@master:~/installation/hbase-0.90.4$ jps  
  2. 15899 SecondaryNameNode  
  3. 15553 NameNode  
  4. 21677 Jps  
  5. 21537 HMaster  
其中,HMaster进程就是HBase集群的主结点服务进程。
slaves结点上启动的进程,以slave-03为例:
  1. hadoop@slave-03:~/installation/hbase-0.90.4$ jps  
  2. 6919 HRegionServer  
  3. 4212 QuorumPeerMain  
  4. 7053 Jps  
  5. 3483 DataNode  
上面,HReginServer是HBase集群的从结点服务进程,QuorumPeerMain是ZooKeeper集群的结点服务进程。
或者,查看日志,是否出现启动异常:
  1. master上  :  tail -500f $HBASE_HOME/logs/hbase-hadoop-master-master.log  
  2. slave-01上:  tail -500f $HBASE_HOME/logs/hbase-hadoop-zookeeper-slave-01.log  
  3. slave-02上:  tail -500f $HBASE_HOME/logs/hbase-hadoop-zookeeper-slave-02.log  
  4. slave-03上:  tail -500f $HBASE_HOME/logs/hbase-hadoop-zookeeper-slave-03.log  
6、验证HBase安装
启动HBase shell,如果能够显示如下信息则说明HBase集群启动成功:
  1. hadoop@master:~/installation/hbase-0.90.4$ hbase shell  
  2. 12/01/09 01:14:09 WARN conf.Configuration: hadoop.native.lib is deprecated. Instead, use io.native.lib.available  
  3. 12/01/09 01:14:09 WARN conf.Configuration: hadoop.native.lib is deprecated. Instead, use io.native.lib.available  
  4. 12/01/09 01:14:09 WARN conf.Configuration: hadoop.native.lib is deprecated. Instead, use io.native.lib.available  
  5. HBase Shell; enter 'help<RETURN>' for list of supported commands.  
  6. Type "exit<RETURN>" to leave the HBase Shell  
  7. Version 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011  
  8.   
  9.   
  10. hbase(main):001:0> help  
  11. HBase Shell, version 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011  
  12. Type 'help "COMMAND"', (e.g. 'help "get"' -- the quotes are necessary) for help on a specific command.  
  13. Commands are grouped. Type 'help "COMMAND_GROUP"', (e.g. 'help "general"') for help on a command group.  
  14.   
  15.   
  16. COMMAND GROUPS:  
  17.   Group name: general  
  18.   Commands: status, version  
  19.   
  20.   
  21.   Group name: ddl  
  22.   Commands: alter, create, describe, disable, drop, enable, exists, is_disabled, is_enabled, list  
  23.   
  24.   
  25.   Group name: dml  
  26.   Commands: count, delete, deleteall, get, get_counter, incr, put, scan, truncate  
  27.   
  28.   
  29.   Group name: tools  
  30.   Commands: assign, balance_switch, balancer, close_region, compact, flush, major_compact, move, split, unassign, zk_dump  
  31.   
  32.   
  33.   Group name: replication  
  34.   Commands: add_peer, disable_peer, enable_peer, remove_peer, start_replication, stop_replication  
  35.   
  36.   
  37. SHELL USAGE:  
  38. Quote all names in HBase Shell such as table and column names.  Commas delimit  
  39. command parameters.  Type <RETURN> after entering a command to run it.  
  40. Dictionaries of configuration used in the creation and alteration of tables are  
  41. Ruby Hashes. They look like this:  
  42.   
  43.   
  44.   {'key1' => 'value1', 'key2' => 'value2', ...}  
  45.   
  46.   
  47. and are opened and closed with curley-braces.  Key/values are delimited by the  
  48. '=>' character combination.  Usually keys are predefined constants such as  
  49. NAME, VERSIONS, COMPRESSION, etc.  Constants do not need to be quoted.  Type  
  50. 'Object.constants' to see a (messy) list of all constants in the environment.  
  51.   
  52.   
  53. If you are using binary keys or values and need to enter them in the shell, use  
  54. double-quote'd hexadecimal representation. For example:  
  55.   
  56.   
  57.   hbase> get 't1', "key\x03\x3f\xcd"  
  58.   hbase> get 't1', "key\003\023\011"  
  59.   hbase> put 't1', "test\xef\xff", 'f1:', "\x01\x33\x40"  
  60.   
  61.   
  62. The HBase shell is the (J)Ruby IRB with the above HBase-specific commands added.  
  63. For more on the HBase Shell, see http://hbase.apache.org/docs/current/book.html  
  64. hbase(main):002:0> status  
  65. 3 servers, 0 dead, 0.0000 average load  
  66.   
  67.   
  68. hbase(main):003:0> version  
  69. 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011  
  70.   
  71.   
  72. hbase(main):004:0>   
你可以按照前面使用本地文件系统安装过程中,使用的命令来进行相关的操作。
linux
相关资讯       集群  Hbase 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款