返回顶部
首页 > 资讯 > 数据库 >如何在 HBase Shell 命令行正常查看十六进制编码的中文?哈哈~
  • 243
分享到

如何在 HBase Shell 命令行正常查看十六进制编码的中文?哈哈~

摘要

今天比较开心,只想哈哈哈哈哈 啥也不多说了,直接看示例吧!绝对比我口才好~ hbase(main):050:0> scan "test" ROW

如何在 HBase Shell 命令行正常查看十六进制编码的中文?哈哈~

今天比较开心,只想哈哈哈哈哈
啥也不多说了,直接看示例吧!绝对比我口才好~

hbase(main):050:0> scan "test"
ROW                                              COLUMN+CELL
 row-1                                           column=f:c1, timestamp=1587984555307, value=xE7xA6x85xE5x85x8B
 row-2                                           column=f:c2, timestamp=1587984555307, value=HBasexE8x80x81xE5xBAx97
 row-3                                           column=f:c3, timestamp=1587984555307, value=HBasexE5xB7xA5xE4xBDx9CxE7xACx94xE8xAExB0
 row-4                                           column=f:c4, timestamp=1587984555307, value=xE6x88x91xE7x88xB1xE4xBDxA0xE4xB8xADxE5x9BxBDxEFxBCx81
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工作笔记

您可能感兴趣的文档:

--结束END--

本文标题: 如何在 HBase Shell 命令行正常查看十六进制编码的中文?哈哈~

本文链接: https://lsjlt.com/news/5767.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作