chenying99

本文是基于上一篇:Hadoop单机环境安装与配置 的基础之上的。

 
首先解压tar文件,按后按如下方法进行配置。
 

1,hbase-env.sh 

Java代码  
  1. export HBASE_SSH_OPTS="-p 22"  
  2. export HBASE_MANAGES_ZK=true  



2,hbase-site.xml 

Java代码  
  1. <configuration>  
  2.   <property>  
  3.     <name>hbase.rootdir</name>  
  4.     <value>hdfs://localhost:9000</value>  
  5.   </property>  
  6.   
  7.   <property>  
  8.       <name>hbase.cluster.distributed</name>  
  9.       <value>false</value>  
  10.       <description>The mode the cluster will be in. Possible values are  
  11.               false: standalone and pseudo-distributed setups with managed Zookeeper  
  12.              true: fully-distributed with unmanaged Zookeeper Quorum (see hbase-env.sh)  
  13.       </description>  
  14.   </property>  
  15. </configuration>  



3,regionservers 

Java代码  
  1. localhost
 
此时利用start-hbase.sh和stop-hbase.sh可以开始和结束hbase。运行hbase后,利用jps,你会发现多了一个HMaster线程。
 
由于单机版的hadoop+hbase的方法目前总是无法启动zookeeper,所以关于单机版的配置就先研究到这了,下面我会研究伪分布式配置方法。如果谁的单机版的配置可以打开zookeeper了,还麻烦您告诉我一声哈………………

分类:

技术点:

相关文章: