真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

Hbaseshell操作總結(jié)-創(chuàng)新互聯(lián)

進(jìn)入hbase命令行
./hbase shell

成都創(chuàng)新互聯(lián)服務(wù)項(xiàng)目包括李滄網(wǎng)站建設(shè)、李滄網(wǎng)站制作、李滄網(wǎng)頁制作以及李滄網(wǎng)絡(luò)營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術(shù)優(yōu)勢、行業(yè)經(jīng)驗(yàn)、深度合作伙伴關(guān)系等,向廣大中小型企業(yè)、政府機(jī)構(gòu)等提供互聯(lián)網(wǎng)行業(yè)的解決方案,李滄網(wǎng)站推廣取得了明顯的社會(huì)效益與經(jīng)濟(jì)效益。目前,我們服務(wù)的客戶以成都為中心已經(jīng)輻射到李滄省份的部分城市,未來相信會(huì)繼續(xù)擴(kuò)大服務(wù)區(qū)域并繼續(xù)獲得客戶的支持與信任!

顯示hbase中的表
list

創(chuàng)建user表,包含info、data兩個(gè)列族
create ‘users’, ‘info’, ‘data’
//you can also use this command:
// create ‘users’, {NAME => ‘info’, VERSIONS => ‘3’}

向表中插入信息,row key為rk0001,列族info中添加name列標(biāo)示符,值為zhangsan
put ‘users’, ‘rk0001’, ‘info:name’, ‘zhangsan’

向表中插入信息,row key為rk0001,列族info中添加gender列標(biāo)示符,值為female
put ‘user’, ‘rk0001’, ‘info:gender’, ‘female’

向表中插入信息,row key為rk0001,列族info中添加age列標(biāo)示符,值為20
put ‘user’, ‘rk0001’, ‘info:age’, 21

獲取表中row key為rk0001的所有信息
get ‘user’, ‘rk0001’

獲取表中row key為rk0001,info列族的所有信息
get ‘user’, ‘rk0001’, ‘info’

獲取user表中row key為rk0001,info列族的name、age列標(biāo)示符的信息
get ‘user’, ‘rk0001’, ‘info:name’, ‘info:age’

獲取user表中row key為rk0001,info、data列族的信息
get ‘USERS’, ‘rk0001’, ‘INFO’, ‘DATA’
get ‘user’, ‘rk0001’, {COLUMN => [‘info’, ‘data’]}

get ‘user’, ‘rk0001’, {COLUMN => [‘info:name’, ‘data:pic’]}

獲取user表中row key為rk0001,列族為info,版本號(hào)最新5個(gè)的信息
get ‘user’, ‘rk0001’, {COLUMN => ‘info’, VERSIONS => 2}
get ‘user’, ‘rk0001’, {COLUMN => ‘info:name’, VERSIONS => 5}
get ‘user’, ‘rk0001’, {COLUMN => ‘info:name’, VERSIONS => 5, TIMERANGE => [1392368783980, 1392380169184]}

獲取user表中row key為rk0001,cell的值為zhangsan的信息
get ‘people’, ‘rk0001’, {FILTER => “ValueFilter(=, ‘binary:圖片’)”}

獲取user表中row key為rk0001,列標(biāo)示符中含有a的信息
get ‘people’, ‘rk0001’, {FILTER => “(QualifierFilter(=,’substring:a’))”}

put ‘user’, ‘rk0002’, ‘info:name’, ‘fanbingbing’
put ‘user’, ‘rk0002’, ‘info:gender’, ‘female’
put ‘user’, ‘rk0002’, ‘info:nationality’, ‘中國’
get ‘user’, ‘rk0002’, {FILTER => “ValueFilter(=, ‘binary:中國’)”}

查詢user表中的所有信息
scan ‘user’

查詢user表中列族為info的信息
scan ‘user’, {COLUMNS => ‘info’}
scan ‘user’, {COLUMNS => ‘info’, RAW => true, VERSIONS => 5}
scan ‘persion’, {COLUMNS => ‘info’, RAW => true, VERSIONS => 3}
查詢user表中列族為info和data的信息
scan ‘user’, {COLUMNS => [‘info’, ‘data’]}
scan ‘user’, {COLUMNS => [‘info:name’, ‘data:pic’]}

查詢user表中列族為info、列標(biāo)示符為name的信息
scan ‘user’, {COLUMNS => ‘info:name’}

查詢user表中列族為info、列標(biāo)示符為name的信息,并且版本最新的5個(gè)
scan ‘user’, {COLUMNS => ‘info:name’, VERSIONS => 5}

查詢user表中列族為info和data且列標(biāo)示符中含有a字符的信息
scan ‘user’, {COLUMNS => [‘info’, ‘data’], FILTER => “(QualifierFilter(=,’substring:a’))”}

查詢user表中列族為info,rk范圍是[rk0001, rk0003)的數(shù)據(jù)
scan ‘people’, {COLUMNS => ‘info’, STARTROW => ‘rk0001’, ENDROW => ‘rk0003’}

查詢user表中row key以rk字符開頭的
scan ‘user’,{FILTER=>”PrefixFilter(‘rk’)”}

查詢user表中指定范圍的數(shù)據(jù)
scan ‘user’, {TIMERANGE => [1392368783980, 1392380169184]}

刪除數(shù)據(jù)
刪除user表row key為rk0001,列標(biāo)示符為info:name的數(shù)據(jù)
delete ‘people’, ‘rk0001’, ‘info:name’
刪除user表row key為rk0001,列標(biāo)示符為info:name,timestamp為1392383705316的數(shù)據(jù)
delete ‘user’, ‘rk0001’, ‘info:name’, 1392383705316

清空user表中的數(shù)據(jù)
truncate ‘people’

修改表結(jié)構(gòu)
首先停用user表(新版本不用)
disable ‘user’

添加兩個(gè)列族f1和f2
alter ‘people’, NAME => ‘f1’
alter ‘user’, NAME => ‘f2’
啟用表
enable ‘user’

disable ‘user’(新版本不用)
刪除一個(gè)列族:
alter ‘user’, NAME => ‘f1’, METHOD => ‘delete’ 或 alter ‘user’, ‘delete’ => ‘f1’

添加列族f1同時(shí)刪除列族f2
alter ‘user’, {NAME => ‘f1’}, {NAME => ‘f2’, METHOD => ‘delete’}

將user表的f1列族版本號(hào)改為5
alter ‘people’, NAME => ‘info’, VERSIONS => 5
啟用表
enable ‘user’

刪除表
disable ‘user’
drop ‘user’

get ‘person’, ‘rk0001’, {FILTER => “ValueFilter(=, ‘binary:中國’)”}
get ‘person’, ‘rk0001’, {FILTER => “(QualifierFilter(=,’substring:a’))”}
scan ‘person’, {COLUMNS => ‘info:name’}
scan ‘person’, {COLUMNS => [‘info’, ‘data’], FILTER => “(QualifierFilter(=,’substring:a’))”}
scan ‘person’, {COLUMNS => ‘info’, STARTROW => ‘rk0001’, ENDROW => ‘rk0003’}

scan ‘person’, {COLUMNS => ‘info’, STARTROW => ‘20140201’, ENDROW => ‘20140301’}
scan ‘person’, {COLUMNS => ‘info:name’, TIMERANGE => [1395978233636, 1395987769587]}
delete ‘person’, ‘rk0001’, ‘info:name’

alter ‘person’, NAME => ‘ffff’
alter ‘person’, NAME => ‘info’, VERSIONS => 10

get ‘user’, ‘rk0002’, {COLUMN => [‘info:name’, ‘data:pic’]}

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。


本文題目:Hbaseshell操作總結(jié)-創(chuàng)新互聯(lián)
標(biāo)題路徑:http://weahome.cn/article/ceehhj.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部