Updates for section 2.4.2.1 of Apache HBase Reference Guide.
2.4.2.1. Pseudo-distributed
A pseudo-distributed mode is simply a distributed mode run on a single host. Use this configuration testing and prototyping on HBase. Do not use this configuration for production nor for evaluating HBase performance.
First, confirm your local HDFS setup. Below is an example conf/core-site.xml and conf/hdfs-site.xml. Note that the replication is set to 1 because this is a pseudo-distributed setup. The properties dfs.name.dir and dfs.data.dir are being set explicitly, the latter being where HDFS data will exist on your machine.
Next, configure HBase for usage. Below is an example conf/hbase-site.xml. Note that the hbase.rootdir property points to the local HDFS instance. This is the file into which you add local customizations and overrides for Section 2.6.1.1, “HBase Default Configuration” and Section 2.4.2.2.3, “HDFS Client Configuration”.
Now skip to Section 2.4.3, “Running and Confirming Your Installation” for how to start and verify your pseudo-distributed install. [12]
Note
Let HBase create the hbase.rootdir directory. If you don't, you'll get warning saying HBase needs a migration run because the directory is missing files expected by HBase (it'll create them if you let it).
Note
Above we bind to localhost. This means that a remote client cannot connect. Amend accordingly, if you want to connect from a remote location.
Note
Modify your /etc/hosts file and change 127.0.1.1 to 127.0.0.1 to avoid loopback problem.
2.4.2.1.1. Pseudo-distributed Configuration Files
The following are example configuration files from a pseudo-distributed setup.
core-site.xml
...
fs.default.name
hdfs://localhost:9000
hadoop.tmp.dir
/Users/local/user.name/tmp
...
hdfs-site.xml
...
dfs.name.dir
/Users/local/user.name/hdfs-data-name
dfs.data.dir
/Users/local/user.name/hdfs-data
dfs.replication
1
...
hbase-site.xml
...
hbase.rootdir
hdfs://localhost:9000/hbase
hbase.zookeeper.property.clientPort
2181
hbase.zookeeper.quorum
localhost
hbase.cluster.distributed
true
...
Edit the following lines in conf/hbase-env.sh file.
export BASE_REGIONSERVERS =/HBASE_HOME/conf/regionservers
export HBASE_MANAGES_ZK=true
Note
Copy the hadoop-core-*.jar from HADOOP_HOME and commons-collections-3.2.1.jar from HADOOP_HOME/lib folder into your HBASE_HOME/lib folder to avoid any compatibility issues between Hadoop and Hbase.