Install HBase on Windows 10
Setting up HBase on Windows 10 (Professional) is not that difficult. You can follow the below 6 steps to install and run HBase on a Windows 10 machine.
* Prerequisite — Setup and start Hadoop
- Download HBase from Apache HBase site.
- Download Link -> https://hbase.apache.org/downloads.html ( I used version hbase-1.4.9-bin.tar.gz)
2. Unzip it to a folder — I used c:\software\hbase.
3. Now we need to change 2 files; a config and a cmd file. Inorder to do that, go to the unzipped location.
Change 1 — Edit hbase-config.cmd, located in the bin folder under the unzipped location and add the below line to set JAVA_HOME [add it below the comments section on the top]
set JAVA_HOME=C:\software\Java\jdk1.8.0_201
Change 2 — Edit hbase-site.xml, located in the conf folder under the unzipped location and add the section below to hbase-site.xml. [inside <configuration> tag]
Note : hbase.rootdir’s value Eg : hdfs://localhost:9000/hbase, must be same as the hadoop core-site.xml’s fs.defaultFS value.
<property>
<name>hbase.rootdir</name>
<value>file:/home/hadoop/HBase/HFiles</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/hadoop/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>false</value>
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
5. Now we are all set to run HBase, to start HBase execute the command below from the bin folder.
- Open Command Prompt and cd to Hbase’ bin directory
- Run start-hbase.cmd
- Look for any errors
6. Test the installation using HBase shell
- Open command prompt and cd to HBase’ bin directory
- Run hbase shell [should connect to the HBase server]
- Try creating a table
- create ‘emp’,’p’
- list [Table name should get printed]
- put ‘emp’,’emp01',’p:fn’,’First Name’
- scan ‘emp’ [The row content should get printed]