国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

HBASE 常用shell命令,增刪改查方法

2019-10-26 18:57:46
字體:
來源:轉載
供稿:網友

1、首先給出本次操作的數據

create 'student','info','address'put 'student','1','info:age','20'put 'student','1','info:name','wang'put 'student','1','info:class','1'put 'student','1','address:city','zhengzhou'put 'student','1','address:area','High-tech zone'put 'student','2','info:age','21'put 'student','2','info:name','yang'put 'student','2','info:class','1'put 'student','2','address:city','beijing'put 'student','2','address:area','CBD'put 'student','3','info:age','22'put 'student','3','info:name','zhao'put 'student','3','info:class','2'put 'student','3','address:city','shanghai'put 'student','3','address:area','pudong'scan 'student'

2、首先執行,創建表,增加數據操作,執行腳本 /bin/hbase shell ./student.txt,然后查看內容 scan ‘student'

hbase(main):001:0> scan 'student'ROW      COLUMN+CELL 1       column=address:area, timestamp=1491533426260, value=High-tech zone 1       column=address:city, timestamp=1491533426239, value=zhengzhou 1       column=info:age, timestamp=1491533426179, value=20 1       column=info:class, timestamp=1491533426218, value=1 1       column=info:name, timestamp=1491533426211, value=wang 2       column=address:area, timestamp=1491533426297, value=CBD 2       column=address:city, timestamp=1491533426292, value=beijing 2       column=info:age, timestamp=1491533426269, value=21 2       column=info:class, timestamp=1491533426287, value=1 2       column=info:name, timestamp=1491533426277, value=yang 3       column=address:area, timestamp=1491533426329, value=pudong 3       column=address:city, timestamp=1491533426323, value=shanghai 3       column=info:age, timestamp=1491533426305, value=22 3       column=info:class, timestamp=1491533426317, value=2 3       column=info:name, timestamp=1491533426311, value=zhao3 row(s) in 0.1940 seconds

3、修改操作 也是用put命令,就是重新添加內容把,把以前的內容覆蓋。

格式 put 't1', 'r1', 'c1', 'value'
命令 put 'student','1','info:age','18'
結果hbase(main):010:0> get 'student','1'COLUMN      CELL address:area    timestamp=1491533426260, value=High-tech zone address:city    timestamp=1491533426239, value=zhengzhou info:age     timestamp=1491533823331, value=18 info:class    timestamp=1491533426218, value=1 info:name     timestamp=1491533426211, value=wang5 row(s) in 0.0110 seconds

4、刪除操作,分為刪除單元格的內容,和整行刪除

單元格

hbase(main):012:0> delete 'student','1','info:name'0 row(s) in 0.0800 secondshbase(main):014:0> get 'student','1'COLUMN      CELL address:area    timestamp=1491533426260, value=High-tech zone address:city    timestamp=1491533426239, value=zhengzhou info:age     timestamp=1491533823331, value=18 info:class    timestamp=1491533426218, value=14 row(s) in 0.0120 seconds            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 得荣县| 新营市| 永胜县| 昌黎县| 临漳县| 温宿县| 永昌县| 瓮安县| 唐海县| 花莲市| 阳曲县| 新郑市| 交城县| 抚松县| 固镇县| 普陀区| 杨浦区| 浪卡子县| 宁阳县| 郓城县| 石楼县| 内黄县| 襄汾县| 皋兰县| 台州市| 安顺市| 英吉沙县| 遂宁市| 河东区| 柳河县| 容城县| 垣曲县| 衡南县| 吉木萨尔县| 蓬溪县| 新乡县| 和田县| 敖汉旗| 彭泽县| 蒙山县| 台北县|