How to setup a Single node - hadoop cluster with hBASE
This guy has good instructions - http://blog.ibd.com/Part 1 setup Hadoop1. Get download and untar
wget http://apache.mirrors.hoobly.com/hadoop/core/hadoop-0.20.0/hadoop-0.20.0.tar.gz
tar xvf hadoop-0.20.0.tar.gz
2. Modify configuration files
cd hadoop-0.20.0/conf$edit core-site.xml
Add
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
3. Edit site configuration for replication.
hadoop-0.20.0/conf$edit hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
4. Set Map reduce node - note even if we are not using it.
hadoop-0.20.0/conf$edit mapred-site.xml
<configuration>
<property>
<name>mapred.job.tracker</name>
<value>localhost:9001</value>
</property>
</configuration>
5. Check local ssh access
hadoop-0.20.0/conf$ssh localhost
Last login: Sat Sep 5 11:56:25 2009
LOLCAT@~$exit
logout
Connection to localhost closed.
6. Format / initialize hadoop file system
hadoop-0.20.0$bin/hadoop namenode -format
09/09/05 12:01:28 INFO namenode.NameNode: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG: host = LOLCAT.local/10.0.1.193
STARTUP_MSG: args = [-format]
STARTUP_MSG: version = 0.20.0
STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20 -r 763504; compiled by 'ndaley' on Thu Apr 9 05:18:40 UTC 2009
************************************************************/
09/09/05 12:01:28 INFO namenode.FSNamesystem: fsOwner=spicysquid,staff,com.apple.sharepoint.group.2,admin,com.apple.sharepoint.group.1
09/09/05 12:01:28 INFO namenode.FSNamesystem: supergroup=supergroup
09/09/05 12:01:28 INFO namenode.FSNamesystem: isPermissionEnabled=true
09/09/05 12:01:28 INFO common.Storage: Image file of size 100 saved in 0 seconds.
09/09/05 12:01:28 INFO common.Storage: Storage directory /tmp/hadoop-spicysquid/dfs/name has been successfully formatted.
09/09/05 12:01:28 INFO namenode.NameNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at LOLCAT.local/10.0.1.193
************************************************************/
8. Start everything up!
./start-all.sh
starting namenode, logging to /Users/spicysquid/hbase/hadoop20/hadoop-0.20.0/bin/../logs/hadoop-spicysquid-namenode-LOLCAT.local.out
localhost: starting datanode, logging to /Users/spicysquid/hbase/hadoop20/hadoop-0.20.0/bin/../logs/hadoop-spicysquid-datanode-LOLCAT.local.out
localhost: starting secondarynamenode, logging to /Users/spicysquid/hbase/hadoop20/hadoop-0.20.0/bin/../logs/hadoop-spicysquid-secondarynamenode-LOLCAT.local.out
starting jobtracker, logging to /Users/spicysquid/hbase/hadoop20/hadoop-0.20.0/bin/../logs/hadoop-spicysquid-jobtracker-LOLCAT.local.out
localhost: starting tasktracker, logging to /Users/spicysquid/hbase/hadoop20/hadoop-0.20.0/bin/../logs/hadoop-spicysquid-tasktracker-LOLCAT.local.out
9. Check urls to see if they are up:
The Job Tracker can be found at http://localhost:50030
The Task Tracker can be found at http://localhost:50060
The NameNode / Filesystem / log browser can be found at http://localhost:50070
Part 2 - Setup HBASE
1. download hbase 20 and untar
wget http://people.apache.org/~stack/hbase-0.20.0-candidate-3/hbase-0.20.0.tar.gz
tar xvf hbase-0.20.0.tar.gz
2. Modify conf/hbase-site.xml for hdfs server
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
<description>The directory shared by region servers.
</description>
</property>
3. start hbase
*** optional --- i had to start zookeeper first...
hbase-0.20.0/bin$./hbase-daemon.sh start zookeeper
./start-hbase.sh
4. create a table.
hbase-0.20.0/bin/hbase shell
1 row(s) in 0.0170 seconds
hbase(main):003:0> disable 'test'
09/09/05 13:22:13 INFO client.HBaseAdmin: Disabled test
0 row(s) in 4.0660 seconds
hbase(main):004:0> drop 'test'
09/09/05 13:22:17 INFO client.HBaseAdmin: Deleted test
0 row(s) in 0.0120 seconds
0 row(s) in 0.0040 seconds
0 row(s) in 0.0440 seconds
hbase(main):005:0> create 'test','data'
0 row(s) in 0.0500 seconds
hbase(main):006:0> list
5. Check
Check hdfs web url to see how the files are created
The NameNode / Filesystem / log browser can be found at http://localhost:50070
6. stop hbase
stop hadoop
hadoop-0.20.0/bin$./stop-all.sh
stopping jobtracker
localhost: stopping tasktracker
stopping namenode
localhost: stopping datanode
localhost: stopping secondarynamenode
hbase-20.0/bin/./stop-hbase.sh