hbase shell 中文unicode编码,hbaseunicode
在通过hbase shell查看中文值时,是unicode编码格式,使得直接查看中文值不太方便。如果要查看需要把unicode编码进行decode,下面是我比较常用的两种方式:
- python decode方式
前提:需要hbase 客户端上安装python
echo “get ‘test’,’testKey’” | hbase shell | grep “cf” | awk -F ‘=’ ‘{print “print \047”1, 3,”\047.decode(\”utf-8\”)”}’ | python - 安装uni2ascii
echo “get ‘test’,’testKey’” | hbase shell | grep “cf” | awk -F ‘=’ ‘{print “print \047”1, 3,”\047.decode(\”utf-8\”)”}’ | uni2ascii -a U -q
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。