你好,游客 登录 注册 搜索
背景:
阅读新闻

[原]搭建hbase-0.94.26集群环境

[日期:2016-03-14] 来源:lujinhong2的博客  作者: [字体: ]

先安装hadoop1.2.1,见http://blog.csdn.net/jediael_lu/article/details/38926477

1、配置hbase-site.xml

2、配置regionservers

[plain] view plain copy  
  1. slave1 
  2. slave2 

3、配置hbase-env.sh

[plain] view plain copy  
  1. export JAVA_HOME=/usr/java/jdk1.7.0_51 

4、用hadoop的最新版本取代hbase的自带版本

[plain] view plain copy  
  1. $ cd lib/ 
  2. $ rm hadoop-core-1.0.4.jar 
  3. $ cp /opt/jediael/hadoop-1.2.1/hadoop-core-1.2.1.jar . 

5、将hbases整个目录复制到slave中。

[plain] view plain copy  
  1. scp -r hbase-0.94.26/ slave1:/opt/jediael 
  2. scp -r hbase-0.94.26/ slave2:/opt/jediael 

6、启动hbase

[plain] view plain copy  
  1. $ bin/start-hbase.sh 
  2. slave1: starting zookeeper, logging to /opt/jediael/hbase-0.90.4/bin/../logs/hbase-jediael-zookeeper-slave1.out 
  3. slave2: starting zookeeper, logging to /opt/jediael/hbase-0.90.4/bin/../logs/hbase-jediael-zookeeper-slave2.out 
  4. starting master, logging to /opt/jediael/hbase-0.90.4/bin/../logs/hbase-jediael-master-master.out 
  5. slave1: starting regionserver, logging to /opt/jediael/hbase-0.90.4/bin/../logs/hbase-jediael-regionserver-slave1.out 
  6. slave2: starting regionserver, logging to /opt/jediael/hbase-0.90.4/bin/../logs/hbase-jediael-regionserver-slave2.out 

7、验证

(1)http://master:60010/master-status

(2)jps命令

[plain] view plain copy  
  1. $ jps 
  2. 5620 JobTracker 
  3. 5377 NameNode 
  4. 8641 Jps 
  5. 5535 SecondaryNameNode 
  6. 5890 Bootstrap 
  7. 8476 HMaster 
  8.  
  9. $ jps 
  10. 27888 HQuorumPeer 
  11. 27977 HRegionServer 
  12. 26628 TaskTracker 
  13. 28085 Jps 
  14. 26536 DataNode 
  15.  
  16. $ jps 
  17. 27736 HQuorumPeer 
  18. 26654 DataNode 
  19. 26747 TaskTracker 
  20. 27816 HRegionServer 
  21. 27922 Jps 

(3)文件操作

[plain] view plain copy

异常

2015-01-21 22:06:53,258 INFO org.apache.hadoop.hbase.master.ActiveMasterManager: Master=master:60000

2015-01-21 22:06:53,590 FATAL org.apache.hadoop.hbase.master.HMaster: Unhandled exception. Starting shutdown.

java.io.IOException: Call to master/10.171.29.191:9000 failed on local exception: java.io.EOFException

at org.apache.hadoop.ipc.Client.wrapException(Client.java:775)

at org.apache.hadoop.ipc.Client.call(Client.java:743)

at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:220)

at com.sun.proxy.$Proxy5.getProtocolVersion(Unknown Source)

at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:359)

at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:113)

at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:215)

at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:177)

at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:82)

at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1378)

at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:66)

at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1390)

at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:196)

at org.apache.hadoop.fs.Path.getFileSystem(Path.java:175)

at org.apache.hadoop.hbase.util.FSUtils.getRootDir(FSUtils.java:364)

at org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java:81)

at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:346)

at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:282)

Caused by: java.io.EOFException

at java.io.DataInputStream.readInt(DataInputStream.java:392)

at org.apache.hadoop.ipc.Client$Connection.receiveResponse(Client.java:501)

at org.apache.hadoop.ipc.Client$Connection.run(Client.java:446)

2015-01-21 22:06:53,599 INFO org.apache.hadoop.hbase.master.HMaster: Aborting

2015-01-21 22:06:53,599 DEBUG org.apache.hadoop.hbase.master.HMaster: Stopping service threads

2015-01-21 22:06:53,599 INFO org.apache.hadoop.ipc.HBaseServer: Stopping server on 60000

2015-01-21 22:06:53,599 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 0 on 60000: exiting

2015-01-21 22:06:53,599 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 1 on 60000: exiting

2015-01-21 22:06:53,599 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 2 on 60000: exiting

2015-01-21 22:06:53,600 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 3 on 60000: exiting

2015-01-21 22:06:53,600 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 4 on 60000: exiting

2015-01-21 22:06:53,600 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 5 on 60000: exiting

2015-01-21 22:06:53,600 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 6 on 60000: exiting

2015-01-21 22:06:53,600 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 7 on 60000: exiting

2015-01-21 22:06:53,601 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 8 on 60000: exiting

2015-01-21 22:06:53,601 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 9 on 60000: exiting

2015-01-21 22:06:53,601 INFO org.apache.hadoop.ipc.HBaseServer: Stopping IPC Server listener on 60000

2015-01-21 22:06:53,603 INFO org.apache.hadoop.ipc.HBaseServer: Stopping IPC Server Responder

2015-01-21 22:06:53,622 INFO org.apache.zookeeper.ZooKeeper: Session: 0x4b0cd139190000 closed

2015-01-21 22:06:53,622 INFO org.apache.hadoop.hbase.master.HMaster: HMaster main thread exiting

2015-01-21 22:06:53,623 INFO org.apache.zookeeper.ClientCnxn: EventThread shut down





收藏 推荐 打印 | 录入:elainebo | 阅读:
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数
点评:
       
评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款