windows hbase installation

In the previous post,  I have introduced how to install hadoop on windows based system. Now, I will introduce how to install hbase on windows.

1. Preparation:

before the installation, let's take a look at the hadoop-hbase suppot matrix below:

you can choose the apropriate version of hbase which is supported by your hadoop system. Because I have installed hadoop 2.7.1 in the previous post, so I choose to install hbase 1.3.1 which is supported by hadoop 2.7.1.

2. Download hbase 1.3.1.tar.gz from apache official site.

3. Unzip the hbase 1.3.1.tar.gz into your local computer.

On my computer, I unzipped in folder: C:UserDefinedBigDatahbase-1.3.1 which is the hbase root.

4. Configuration

 The configuration mainly about two files which located at %HBASE_HOME%conf folder hbase-site.xml   hbase-env.cmd   

4.1) hbase-site.xml

<configuration>
<property>
<!-- hbase mater address-->
<name>hbase.master</name>
<value>localhost:6000</value>
</property>
<property>
<name>hbase.master.maxclockskew</name>
<value>180000</value>
</property>
<property>
<!-- hbase folder in hdfs-->
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>
<property>
<!-- ZK master address-->
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<!-- hbase data folder in zookeeper-->
<name>hbase.zookeeper.property.dataDir</name>
<value>/hbase</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>

 4.2) hbase-env.cmd

set the JAVA_HOME path.

Note:
you can use fullpath of the jdk installation root dir. or if you have configurate the JAVA_HOME path, you can also reference the system variable.

 because I have configurate the java_home variable, so I reference the system var directly.

5. Operation

5.1) stop hadoop if hadoop has been started. command as follows:

%hadoop_home%sbinstop-all.cmd

Note:

%hadoop_home% referes to the root dir of your hadoop install  location.

5.2) start hadoop using command as follows:

%hadoop_home%sbinstart-all.cmd

Note:

%hadoop_home% referes to the root dir of your hadoop install location.

5.3) start hbase using command as follows:

%hbase_home%start-hbase.cmd

Note:

%hbase_home% referes to the root dir of your hbase install  location.

 

 5.4) start hbase restfull service 

%hbase_home%hbase rest start -p 6000

Note:

%hbase_home% referes to the root dir of your hbase install  location.

 

5.5 start  hbase shell

%hbase_home%hbase shell

Note:

%hbase_home% referes to the root dir of your hbase install  location.

原文地址:https://www.cnblogs.com/lenmom/p/7804763.html