This test installs the machine for Mac book Pro, the system for OS X 10.9.4. HBase version 0.98.6.1.
Use the Java version of the JDK 1.6.0_65 for Oracle.
1. Download and install hbase-0.98.6.1
The download here is 0.98.6.1, after downloading the unzip. The extracted directory is hbase-0.98.6.1-hadoop2/
Note: HBase already contains Hadoop, so no additional Hadoop is installed.
2. Modify the configuration
(1) conf/hbase-env.sh
Export Java_home=/library/java/home
(2) Conf/hbase-site.xml
<property> <name>hbase.rootdir</name> <value>file:///users/beef_in_jp/ documents/hadoop/hbase-0.98.6.1-hadoop2i/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/users/beef_in_jp/documents/hadoop/ Hbase-0.98.6.1-hadoop2/zookeeper</value> </property>
3. Start-up and simple testing
(1) Start
./bin/start-hbase.sh
Information displayed after executing the startup script:
Starting master, logging to/users/beef_in_jp/documents/hadoop/hbase-0.98.6.1-hadoop2/bin/. /logs/hbase-beef_in_jp-master-liu-macbook-pro.local.out
Then go to read the log:
2014-10-09 16:25:53.287 java[18243:1003] Unable to load realms info from Scdynamicstore
This error has also occurred in previous Hadoop installation tests, modified conf/hbase-env.sh, the original settings:
Export hbase_opts= "-XX:+USECONCMARKSWEEPGC"
Add options, now for:
Export hbase_opts= "-xx:+useconcmarksweepgc-djava.security.krb5.realm=ox. ac.uk-djava.security.krb5.kdc=kdc0.ox.ac.uk:kdc1.ox.ac.uk "
Stop HBase,
./bin/stop-hbase.sh
Start again, it should be successful.
(2) Simple test
Start the HBase shell
./bin/hbase Shell
Perform help in the shell to see the helpful information:
HBase (main):001:0> Help
Create a test table:
HBase (main):002:0> create ' test ', ' CF '
To List table information:
HBase (Main):003:0> list ' test '
Insert several test data:
HBase (main):004:0> put ' test ', ' row1 ', ' cf:a ', ' value1 ' hbase (main):005:0> put ' test ', ' row2 ', ' cf:b ', ' value2 ' HBase (main):006:0> put ' test ', ' row3 ', ' cf:c ', ' value3 '
Query the data you just inserted:
HBase (main):008:0> scan ' test ' ROW column+cell row1 column=cf:a, timestamp=1412845466245, value= value1 row2 column=cf:b, timestamp=1412845472737, value=value2 row3 column=cf:c , timestamp= 1412845478332, Value=value3 3 row (s) in 0.0490 seconds
To query a single piece of data:
HBase (main):010:0> get ' test ', ' row1 '
COLUMN CELL
Cf:a timestamp=1412845466245, Value=value1
1 row (s) in 0.0100 seconds
(3) Accessing the HBase Admin interface in the browser: http://localhost:60010,
Chinese version of the Help manual http://abloz.com/hbase/book.html
4. Some details.
(1) After starting HBase, the listening port number is increased as follows:
Tcp46 0 0 *.60010 * LISTEN tcp46 0 0 *.54436 * * LISTEN TCP4 0 0 10.10.10.232.54435 * LISTEN tcp4 0 0 10.10.10.232.54433 * * LISTEN
HBase Mac OSX Installation Notes