Get output from scans in hbase shell

前端 未结 4 2086
我在风中等你
我在风中等你 2020-12-24 06:09

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

4条回答
  •  醉梦人生
    2020-12-24 06:51

    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!

提交回复
热议问题