Database Reference
In-Depth Information
Note that HBase has given the address of its log file, so you can check the logs for errors. The logs files look like this:
[hadoop@hc1r1m2 hbase]$ ls -l /usr/local/hbase/logs/
total 28
-rw-rw-r--. 1 hadoop hadoop 11099 Apr 9 18:32 hbase-hadoop-master-hc1r1m2.log
-rw-rw-r--. 1 hadoop hadoop 0 Apr 9 18:32 hbase-hadoop-master-hc1r1m2.out
-rw-rw-r--. 1 hadoop hadoop 78 Apr 9 18:30 hbase-hadoop-regionserver-hc1r1m2.log
-rw-rw-r--. 1 hadoop hadoop 250 Apr 9 18:30 hbase-hadoop-regionserver-hc1r1m2.out
A few typical errors reported might be related to ZooKeeper, such as:
2014-04-13 14:53:54,827 WARN org.apache.zookeeper.ClientCnxn: Session 0x14558da65420000 for server
null, unexpected error,
closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
This indicates that either Zo1oKeeper is down or there are network issues. Make sure that all of your ZooKeeper
servers are up, and check the ZooKeeper logs.
A good way to see that HBase is working is to start a shell and create a table. For example, start the shell as
follows:
[root@hc1r1m2 bin]# pwd
/usr/local/hbase/bin
[root@hc1r1m2 bin]# ./hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.90.4, r1150278, Sun Jul 24 15:53:29 PDT 2011
hbase(main):001:0>
Now, create a table named “employer” with a single column named “empname” for the name of the employee
and insert some data:
hbase(main):001:0> create 'employer', 'empname'
0 row(s) in 0.5650 seconds
Insert a single row into the table column created with the employee name "Evans D"; this is row 1:
hbase(main):004:0> put 'employer', 'row1', 'empname', 'Evans D'
0 row(s) in 0.0130 seconds
Check that this data is accessible from the employee table:
hbase(main):005:0> get 'employer', 'row1'
COLUMN CELL
empname: timestamp=1397028137988, value=Evans D
1 row(s) in 0.0330 seconds
hbase(main):006:0> exit
 
Search WWH ::




Custom Search