Indicates the structure of the HLog File. In fact, the HLog File is a common Hadoop Sequence File. The Key of the Sequence File is the HLogKey object, and the HLogKey records the ownership information of the written data, in addition to the table and region names, it also includes the sequence number and timestamp. The timestamp is the "write time", the starting value of the sequence number is 0, or the sequence number that was last stored in the file system.
The Value of HLog Sequece File is the KeyValue object of HBase, which corresponds to the KeyValue in HFile. See the preceding description.
Iii. Hbase Installation1. Hbase version Selection
Select an Apache Download Mirror (Apache Download image) and Download a stable Hbase version. decompress the package as follows:
tar zxvf hbase-1.0.3-bin.tar.gz -C /home/hadoop/
Set Hbase Environment Variables
# hbase envexport HBASE_HOME=/home/hadoop/hbaseexport PATH=$PATH:$HBASE_HOME/bin
# Obtain Hbase Option List and version information
hbase version
2. Test drive
# Start a temporary Hbase instance that uses the local file system/tmp directory as persistent Storage
start-hbase.shstarting master, logging to /home/hadoop/hbase/logs/hbase-root-master-linux-node1.out
# Create a table named test so that it only contains one column named data. The table and column family attributes are default values.
hbase(main):001:0> create 'test','data'0 row(s) in 0.4150 seconds
# Run The help command and list to check whether the newly created table exists.
hbase(main):003:0> listTABLEtest1 row(s) in 0.0230 seconds
# Insert data into two different rows and columns in the column family data, and then list the table content
hbase(main):004:0> put 'test','row1','data:1','values1'0 row(s) in 0.1280 secondshbase(main):005:0> put 'test','row2','data:2','values2'0 row(s) in 0.0090 secondshbase(main):006:0> scan 'test'ROW COLUMN+CELLrow1 column=data:1, timestamp=1473585137461, value=values1row2 column=data:2, timestamp=1473585158072, value=values22 row(s) in 0.0200 seconds
# To delete the created table test, you must first disable it and then delete it. If you do not set it, an error is returned:
ERROR: Table test is enabled. Disable it first.hbase(main):009:0> disable 'test'0 row(s) in 1.1800 secondshbase(main):010:0> drop 'test'0 row(s) in 0.1570 seconds
Original address: http://www.linuxprobe.com/hadoop-hbase-deploy-use.html ghost