欢迎投稿

今日深度:

hbase shell 中文unicode编码,hbaseunicode

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

www.htsjk.Com true http://www.htsjk.com/hbase/33809.html NewsArticle hbase shell 中文unicode编码,hbaseunicode 在通过hbase shell查看中文值时,是unicode编码格式,使得直接查看中文值不太方便。如果要查看需要把unicode编码进行decode,下面是我比较常用的两种方式...
相关文章
    暂无相关文章
评论暂时关闭