--create table
member is table name
member_id , address , info are column family
create 'member','member_id','address,''info'
--delete column family
disable 'member'
alter 'member',{NAME='address','METHOD=''delete'}
enable 'member'
--DML
====insert
put 'member','wo','address:age' ,'26'
====update
put 'member','wo','address:age' ,'27'
--query
====select
get 'member','wo','address:age'
====select historical 'address:age' ,'26'
get 'member','wo',{COLUMN=>'address:age', TIMESTAMP=>$timestampe value of historical data}
--others:
====desc table
describe 'member'
====all table scan
scan 'member'
ROW COLUMN+CELL
shabi column=address:age, timestamp=1456263402795, value=26
shabi column=info:age, timestamp=1456263628325, value=27
shabi column=info:detials, timestamp=1456263201562, value=s25
--how to process index?
select indexed_column from table => set indexed_column as key in HBAse
select .... from table 1 table2 where table1.column = table2.column and a=? => set a as key of table1 set table1.column as key of table2
select .... from table 1 where a=? and b=? => set (a,b) as an union key
6278

被折叠的 条评论
为什么被折叠?



