You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ted Yu <yu...@gmail.com> on 2010/10/26 00:00:10 UTC

calling hbase shell from bash

Hi,
I use the following in bash:
echo "get '$table', 'row'" | bin/hbase shell

The above is in a loop. Is there a way to expedite execution by not spawning
hbase shell each time ?

Also, how do I set timeout for the above command so that I can have control
over the amount of time my bash script uses ?

Thanks

Re: calling hbase shell from bash

Posted by Stack <st...@duboce.net>.
On Mon, Oct 25, 2010 at 3:00 PM, Ted Yu <yu...@gmail.com> wrote:
> Hi,
> I use the following in bash:
> echo "get '$table', 'row'" | bin/hbase shell
>
> The above is in a loop. Is there a way to expedite execution by not spawning
> hbase shell each time ?
>

You'd have to daemonize the shell and then send it commands.  Its
probably possible but I've not tried it.  Use REST server instead?


> Also, how do I set timeout for the above command so that I can have control
> over the amount of time my bash script uses ?
>

There are some suggestions here:

http://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay


St.Ack