CDH之HBase2字符编码问题以及中文显示,在scan命令后添加,{FORMATTER=>‘toString’} 即可
ex:
scan "view_item" ,{FORMATTER=>'toString'}
hbase(main):001:0>scan "view_item" ,{FORMATTER=>'toString'}
hbase(main):001:0> list
TABLE
view_item
1 row(s)
Took 1.3661 seconds
=> [ "view_item"]
hbase(main):002:0> scan "view_item"
ROW COLUMN+CELL
4813220220089165520168674 column=info:NAME, timestamp=1655286973757, value=\xE6\x9D\x8E\xE5\x95\x8A
9 \xE5\x85\x9C
....
4813220220089165520168674 column=info:ts, timestamp=1655286973757, value=2022-06-14 18:14:32.014749
9 b
1 row(s)
Took 0.6949 seconds
hbase(main):003:0> scan "view_item" ,{FORMATTER=>'toString'}
ROW COLUMN+CELL
4813220220089165520168674 column=info:NAME, timestamp=1655286973757, value=李啊兜
9
....
4813220220089165520168674 column=info:ts, timestamp=1655286973757, value=2022-06-14 18:14:32.014749b
9
1 row(s)
Took 0.1147 seconds