从hbase shell中扫描获取输出 [英] Get output from scans in hbase shell

查看:135
本文介绍了从hbase shell中扫描获取输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以将hbase shell中的扫描结果输出到文件中?我假设这很容易,但我一直无法在文档中找到任何内容。 我知道这个post是相当古老的,但我在寻找关于HBase的东西,并且遇到了它。



我不知道这是否是最好的方法,但您肯定可以使用HBase为您提供的脚本选项。只需打开一个shell(最好进入HBase的目录bin)并运行

  echoscan'foo'| ./hbase shell> myText 

其中foo是要扫描的表的名称。如果你打开myText,你会看到结果。希望我帮了忙!


Is there any way I can output the results from a scan in the hbase shell to a file? I'm assuming this is easy but I haven't been able to find anything in the documentation.

解决方案

I know that this post is quite old but i was searching something about HBase myself and came across with it.

Well i don't know if this is the best way to do it, but you can definitely use the scripting option HBase gives you. Just open a shell (preferably go to the directory bin of HBase) and run

echo "scan 'foo'" | ./hbase shell > myText

where foo is the name of the table you want to scan. If you then open myText you will see the results in there. Hope i helped!

这篇关于从hbase shell中扫描获取输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆