本文转载自http://blog.csdn.net/eastsea/article/details/46124919
1、资源下载
JDK:http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-windows-x64.exe
HBase:http://archive.apache.org/dist/hbase/hbase-0.96.2/hbase-0.96.2-hadoop1-bin.tar.gz
试了很多版本(0.98,1.0,1.1)都报错:
java.io.IOException: Failed to set permissions of path: E:\setup\appdata\XXX\.tmp\8fef1ea898aa46648bbe80ea40630f75 to 0 666
FATAL [DELL-PC:51334.activeMasterManager] master.HMaster: Failed to become active master java.lang.NullPointerException at java.lang.ProcessBuilder.start(ProcessBuilder.java:1010)
2、安装JDK,添加环境变量Path:C:\Program Files\Java\jdk1.7.0_79\bin
3、解压hbase-0.96.2-hadoop1-bin.tar.gz
设置conf下hbase-env.cmd中的JAVA_HOME:set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
设置conf下hbase-site.xml中的路径:
- <configuration>
- <property>
- <name>hbase.rootdirname>
- <value>file:///E:/setup/appdata/hbase052805/hbasevalue>
- property>
- <property>
- <name>hbase.zookeeper.property.dataDirname>
- <value>/appdata/hbase052805/zookeepervalue>
- property>
- configuration>
4、start-hbase.cmd 启动
5、list、create &#39;test&#39;,&#39;col&#39;、put &#39;test&#39;,&#39;row1&#39;,&#39;col:a&#39;,&#39;values1&#39;、scan &#39;test&#39;、get &#39;test&#39;,&#39;row1&#39;