转载请注明出处:http://blog.csdn.net/l1028386804/article/details/46463503
HBASE Shell
进入Habse数据库终端:#$HBASE_HOME/bin/hbase shell
>create‘users‘,‘user_id‘,‘address‘,‘info‘
表users,有三个列族user_id,address,info
>list
>describe ‘users
>create‘users_tmp‘,‘user_id‘,‘address‘,‘info‘
>disable ‘users_tmp‘
>drop ‘users_tmp‘
put ‘users‘,‘xiaoming‘,‘info:age‘,‘24‘;
put ‘users‘,‘xiaoming‘,‘info:birthday‘,‘1987-06-17‘;
put ‘users‘,‘xiaoming‘,‘info:company‘,‘alibaba‘;
put ‘users‘,‘xiaoming‘,‘address:contry‘,‘china‘;
put ‘users‘,‘xiaoming‘,‘address:province‘,‘zhejiang‘;
put ‘users‘,‘xiaoming‘,‘address:city‘,‘hangzhou‘;
put ‘users‘,‘zhangyifei‘,‘info:birthday‘,‘1987-4-17‘;
put ‘users‘,‘zhangyifei‘,‘info:favorite‘,‘movie‘;
put ‘users‘,‘zhangyifei‘,‘info:company‘,‘alibaba‘;
put ‘users‘,‘zhangyifei‘,‘address:contry‘,‘china‘;
put ‘users‘,‘zhangyifei‘,‘address:province‘,‘guangdong‘;
put ‘users‘,‘zhangyifei‘,‘address:city‘,‘jieyang‘;
put ‘users‘,‘zhangyifei‘,‘address:town‘,‘xianqiao‘;
>get ‘users‘,‘xiaoming‘
>get ‘users‘,‘xiaoming‘,‘info‘
get ‘users‘,‘xiaoming‘,‘info:age‘
>put ‘users‘,‘xiaoming‘,‘info:age‘ ,‘29‘
>get ‘users‘,‘xiaoming‘,‘info:age‘
>put ‘users‘,‘xiaoming‘,‘info:age‘ ,‘30‘
>get ‘users‘,‘xiaoming‘,‘info:age‘
>get‘users‘,‘xiaoming‘,{COLUMN=>‘info:age‘,VERSIONS=>1}
>get‘users‘,‘xiaoming‘,{COLUMN=>‘info:age‘,VERSIONS=>2}
>get ‘users‘,‘xiaoming‘,{COLUMN=>‘info:age‘,VERSIONS=>3}
〉get ‘users‘,‘xiaoming‘,{COLUMN=>‘info:age‘,TIMESTAMP=>1364874937056}
>scan ‘users‘
>delete ‘users‘,‘xiaoming‘,‘info:age‘
>get ‘users‘,‘xiaoming‘
>deleteall ‘users‘,‘xiaoming‘
>count ‘users‘
原文地址:http://blog.csdn.net/l1028386804/article/details/46463503