How to configure HBase in standalone mode?
In HBase, single-node mode refers to running HBase on one machine without deploying a distributed cluster. The following are the steps to configure HBase in single-node mode.
- Download the HBase installation package and unzip it into the appropriate directory.
- Navigate to the conf directory of HBase, and modify the hbase-site.xml file to configure the parameters for standalone mode. An example configuration is shown below:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///tmp/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/tmp/zookeeper</value>
</property>
</configuration>
- Edit the hbase-env.sh file to set the JAVA_HOME variable to point to the installation directory of the JDK.
- Start HBase by executing the following command in the bin directory of HBase:
./start-hbase.sh
- You can check the status of HBase through the built-in web interface by visiting http://localhost:16010.
- After you have finished using it, you can close HBase by using the following command:
./stop-hbase.sh
The steps above outline the simple process of setting up HBase in standalone mode. In this mode, HBase can only run on a single node, making it suitable for learning and development purposes.