今天比較開心,只想哈哈~哈哈哈~ 啥也不多說了,直接看示例吧!絕對比我口才好~ 哈哈!Get到了嗎?好意思不幫我分享嘛~哈哈~ 轉載請註明出處!歡迎關註本人微信公眾號【HBase工作筆記】 ...
今天比較開心,只想哈哈哈哈哈
啥也不多說了,直接看示例吧!絕對比我口才好~
hbase(main):050:0> scan 'test'
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=\xE7\xA6\x85\xE5\x85\x8B
row-2 column=f:c2, timestamp=1587984555307, value=HBase\xE8\x80\x81\xE5\xBA\x97
row-3 column=f:c3, timestamp=1587984555307, value=HBase\xE5\xB7\xA5\xE4\xBD\x9C\xE7\xAC\x94\xE8\xAE\xB0
row-4 column=f:c4, timestamp=1587984555307, value=\xE6\x88\x91\xE7\x88\xB1\xE4\xBD\xA0\xE4\xB8\xAD\xE5\x9B\xBD\xEF\xBC\x81
4 row(s) in 0.0190 seconds
hbase(main):051:0> scan 'test', {FORMATTER => 'toString'}
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=禪克
row-2 column=f:c2, timestamp=1587984555307, value=HBase老店
row-3 column=f:c3, timestamp=1587984555307, value=HBase工作筆記
row-4 column=f:c4, timestamp=1587984555307, value=我愛你中國!
4 row(s) in 0.0170 seconds
hbase(main):052:0> scan 'test', {FORMATTER => 'toString',LIMIT=>1,COLUMN=>'f:c4'}
ROW COLUMN+CELL
row-4 column=f:c4, timestamp=1587984555307, value=我愛你中國!
1 row(s) in 0.0180 seconds
hbase(main):053:0> scan 'test', {FORMATTER_CLASS => 'org.apache.hadoop.hbase.util.Bytes', FORMATTER => 'toString'}
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=禪克
row-2 column=f:c2, timestamp=1587984555307, value=HBase老店
row-3 column=f:c3, timestamp=1587984555307, value=HBase工作筆記
row-4 column=f:c4, timestamp=1587984555307, value=我愛你中國!
4 row(s) in 0.0220 seconds
hbase(main):054:0> scan 'test', {FORMATTER_CLASS => 'org.apache.hadoop.hbase.util.Bytes', FORMATTER => 'toString', COLUMN=>'f:c4'}
ROW COLUMN+CELL
row-4 column=f:c4, timestamp=1587984555307, value=我愛你中國!
1 row(s) in 0.0220 seconds
hbase(main):004:0> scan 'test', {COLUMNS => ['f:c1:toString','f:c2:toString'] }
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=禪克
row-2 column=f:c2, timestamp=1587984555307, value=HBase老店
2 row(s) in 0.0180 seconds
hbase(main):003:0> scan 'test', {COLUMNS => ['f:c1:c(org.apache.hadoop.hbase.util.Bytes).toString','f:c3:c(org.apache.hadoop.hbase.util.Bytes).toString'] }
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=禪克
row-3 column=f:c3, timestamp=1587984555307, value=HBase工作筆記
2 row(s) in 0.0160 seconds
hbase(main):055:0> scan 'test', {COLUMNS => ['f:c1:toString','f:c4:c(org.apache.hadoop.hbase.util.Bytes).toString'] }
ROW COLUMN+CELL
row-1 column=f:c1, timestamp=1587984555307, value=禪克
row-4 column=f:c4, timestamp=1587984555307, value=我愛你中國!
2 row(s) in 0.0290 seconds
hbase(main):058:0> get 'test','row-2','f:c2:toString'
COLUMN CELL
f:c2 timestamp=1587984555307, value=Get到了嗎?好意思不幫我分享嘛~哈哈~
1 row(s) in 0.0070 seconds
hbase(main):057:0>
哈哈!Get到了嗎?好意思不幫我分享嘛哈哈
轉載請註明出處!歡迎關註本人微信公眾號【HBase工作筆記】