1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  
tar xzvf hbase-2.0.0-SNAPSHOT-bin.tar.gz
  
cd hbase-2.0.0-SNAPSHOT/

#edit hbase-env.sh
  
#export JAVA_HOME=/home/xxx/apps/jdk1.8.0_111/
  
#export HBASE_MANAGES_ZK=false

#edit hbase-site.xml
  

[xml]

hbase.rootdir

file:///data/hbase

hbase.zookeeper.property.dataDir

/tmp/zookeeper

hbase.cluster.distributed

true

[/xml]

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  
#start hbase
  
start-hbase.sh

#cli
  
./hbase hsell

create 'test', 'cf'
  
list 'test'
  
put 'test', 'row1', 'cf:a', 'value1'
  
scan 'test'
  
get 'test', 'row1'
  
disable 'test'
  
enable 'test'
  
drop 'test'