Set
Up Pseudo-Distributed Mode
1.
Verify
Installation Requirements
–
Java,
password-less SSH
2.
Configure
Java
3.
Configure
the use of HDFS
–
Specify
the location of Namenode
–
Configure
replication
4.
Make
sure HDFS is running
5.
Start
HBase
6.
Verify
HBase is running
6
1:
Verify Installation Requirements
•
SSH
installed, sshd must be running
–
Just
like Hadoop
–
Need
password-less SSH to all the nodes including yourself
–
Required
for both pseudo-distributed and fully-distributed modes
2:
Configure Java
•
vi
<HBASE_HOME>/conf/hbase-env.sh
export
JAVA_HOME=/usr/java/jdk1.6.0
9
3:
Configure the use of HDFS
•
Point
to HDFS for its filesystem
–
Edit
<hbase_home>/conf/hbase-site.xml
–
hbase.rootdir
property:
–
Example:
hdfs://localhost:9000/hbase
–
dfs.replication
property:1
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
...
4:
Make sure HDFS is running
–
Easy
way is to check web-based management console
•
http://localhost:50070/dfshealth.jsp
–
Or
use command line
•
$
hdfs dfs -ls /
13
5:
Start HBase
14
$
cd
<hbase_home>/bin
$
./start-hbase.sh
starting
master, logging to
/home/hadoop/Training/logs/hbase/hbase-hadoop-masterhadoop-laptop.out
6:
Verify HBase is Running
15
$
hbase shell
HBase
Shell; enter 'help<RETURN>' for list of supported commands.
$
hadoop
fs -ls /hbase
Found
5 items
drwxr-xr-x
- hadoop supergroup 0 2011-12-31 13:18 /hbase/-ROOTdrwxr-
xr-x
- hadoop supergroup 0 2011-12-31 13:18 /hbase/.META.
drwxr-xr-x
- hadoop supergroup 0 2011-12-31 13:18 /hbase/.logs
drwxr-xr-x
- hadoop supergroup 0 2011-12-31 13:18 /hbase/.oldlogs
-rw-r--r--
1 hadoop supergroup 3 2011-12-31 13:18 /hbase/hbase.version
HBase
data and metadata is stored in HDFS16
By
default HBase manages Zookeeper daemon for you
•
Logs
by default go to <hbase_home>/logs
–
Change
the default by editing <hbase_home>/conf/hbaseenv.sh
•
export
HBASE_LOG_DIR=/new/location/logs
HBase
comes with web based management
–
http://localhost:60010
Display
cluster's status via status command
–
hbase>
status
–
hbase>
status 'detailed'
No comments:
Post a Comment