You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Lars George <la...@gmail.com> on 2011/05/26 15:00:32 UTC

Shell scripting

Hi,

See this script passed into the shell:

$ bin/hbase shell ~/hbase-shell-status.rb
11/05/26 14:57:33 INFO ipc.HBaseRPC: Using
org.apache.hadoop.hbase.ipc.WritableRpcEngine for
org.apache.hadoop.hbase.ipc.HMasterInterface
1 servers, 0 dead, 44.0000 average load

HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011

Why does it stay inside the shell? I would have expected the same behavior as in

$ echo "status" | bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011

status
11/05/26 14:58:35 INFO ipc.HBaseRPC: Using
org.apache.hadoop.hbase.ipc.WritableRpcEngine for
org.apache.hadoop.hbase.ipc.HMasterInterface
1 servers, 0 dead, 44.0000 average load
$

The latter exits the shell as expected.

Also, for a while now (and I have grown blind to them) we get these
INFO messages from the RPC classes. Should we add them to the block
where we set the logging level already, depending on the -d switch?

Lars

Re: Shell scripting

Posted by Lars George <la...@gmail.com>.
Hi JD,

Yeah, looks like it. But what is the consensus on what should happen?

I leave it to Stack to open an issue (or fix otherwise) in regards to
the logging. :)

Lars


On Thu, May 26, 2011 at 6:48 PM, Jean-Daniel Cryans <jd...@apache.org> wrote:
>> Hi,
>>
>> See this script passed into the shell:
>>
>> $ bin/hbase shell ~/hbase-shell-status.rb
>> 11/05/26 14:57:33 INFO ipc.HBaseRPC: Using
>> org.apache.hadoop.hbase.ipc.WritableRpcEngine for
>> org.apache.hadoop.hbase.ipc.HMasterInterface
>> 1 servers, 0 dead, 44.0000 average load
>>
>> HBase Shell; enter 'help<RETURN>' for list of supported commands.
>> Type "exit<RETURN>" to leave the HBase Shell
>> Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011
>>
>> Why does it stay inside the shell? I would have expected the same behavior as in
>>
>> $ echo "status" | bin/hbase shell
>> HBase Shell; enter 'help<RETURN>' for list of supported commands.
>> Type "exit<RETURN>" to leave the HBase Shell
>> Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011
>>
>> status
>> 11/05/26 14:58:35 INFO ipc.HBaseRPC: Using
>> org.apache.hadoop.hbase.ipc.WritableRpcEngine for
>> org.apache.hadoop.hbase.ipc.HMasterInterface
>> 1 servers, 0 dead, 44.0000 average load
>> $
>>
>> The latter exits the shell as expected.
>
> I think this is
> http://stackoverflow.com/questions/4585313/dropping-user-to-irb-after-reading-from-pipe
>
>>
>> Also, for a while now (and I have grown blind to them) we get these
>> INFO messages from the RPC classes. Should we add them to the block
>> where we set the logging level already, depending on the -d switch?
>
> The RPC logging is only in trunk, and I thought that Stack fixed it
> recently (or did he just talk about doing it? I don't remember).
>
> J-D
>

Re: Shell scripting

Posted by Lars George <la...@gmail.com>.
Hi Stack,

Inline...

On Thu, May 26, 2011 at 7:20 PM, Stack <st...@duboce.net> wrote:
> On Thu, May 26, 2011 at 9:48 AM, Jean-Daniel Cryans <jd...@apache.org> wrote:
>>> Why does it stay inside the shell? I would have expected the same behavior as in
>>>
>
> Doing ./bin/hbase shell SCRIPT_NAME might need a little work.  You
> could add an exit to the script you pass or we could add an exit to
> hirb.rb (Its where we figure if a script has been passed).
>
> There is also ./bin/hbase org.jruby.Main SCRIPT_NAME.  Make sure you
> doc that.   The former runs with irb context.  The latter is raw
> (though the classpath has all you need on it).

Covered.

>>> Also, for a while now (and I have grown blind to them) we get these
>>> INFO messages from the RPC classes. Should we add them to the block
>>> where we set the logging level already, depending on the -d switch?
>>
>> The RPC logging is only in trunk, and I thought that Stack fixed it
>> recently (or did he just talk about doing it? I don't remember).
>>
>
> Yeah, I thought I'd fixed that.  Do you see them in your regionserver
> logs?  You updated recently?

Today. This is when you start the shell! We only set the zk and hbase
logs at startup to be quiet. We need to add rpc too, no?

> St.Ack
>

Re: Shell scripting

Posted by Stack <st...@duboce.net>.
On Thu, May 26, 2011 at 9:48 AM, Jean-Daniel Cryans <jd...@apache.org> wrote:
>> Why does it stay inside the shell? I would have expected the same behavior as in
>>

Doing ./bin/hbase shell SCRIPT_NAME might need a little work.  You
could add an exit to the script you pass or we could add an exit to
hirb.rb (Its where we figure if a script has been passed).

There is also ./bin/hbase org.jruby.Main SCRIPT_NAME.  Make sure you
doc that.   The former runs with irb context.  The latter is raw
(though the classpath has all you need on it).


>> Also, for a while now (and I have grown blind to them) we get these
>> INFO messages from the RPC classes. Should we add them to the block
>> where we set the logging level already, depending on the -d switch?
>
> The RPC logging is only in trunk, and I thought that Stack fixed it
> recently (or did he just talk about doing it? I don't remember).
>

Yeah, I thought I'd fixed that.  Do you see them in your regionserver
logs?  You updated recently?

St.Ack

Re: Shell scripting

Posted by Jean-Daniel Cryans <jd...@apache.org>.
> Hi,
>
> See this script passed into the shell:
>
> $ bin/hbase shell ~/hbase-shell-status.rb
> 11/05/26 14:57:33 INFO ipc.HBaseRPC: Using
> org.apache.hadoop.hbase.ipc.WritableRpcEngine for
> org.apache.hadoop.hbase.ipc.HMasterInterface
> 1 servers, 0 dead, 44.0000 average load
>
> HBase Shell; enter 'help<RETURN>' for list of supported commands.
> Type "exit<RETURN>" to leave the HBase Shell
> Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011
>
> Why does it stay inside the shell? I would have expected the same behavior as in
>
> $ echo "status" | bin/hbase shell
> HBase Shell; enter 'help<RETURN>' for list of supported commands.
> Type "exit<RETURN>" to leave the HBase Shell
> Version 0.91.0-SNAPSHOT, r1127782, Thu May 26 10:28:47 CEST 2011
>
> status
> 11/05/26 14:58:35 INFO ipc.HBaseRPC: Using
> org.apache.hadoop.hbase.ipc.WritableRpcEngine for
> org.apache.hadoop.hbase.ipc.HMasterInterface
> 1 servers, 0 dead, 44.0000 average load
> $
>
> The latter exits the shell as expected.

I think this is
http://stackoverflow.com/questions/4585313/dropping-user-to-irb-after-reading-from-pipe

>
> Also, for a while now (and I have grown blind to them) we get these
> INFO messages from the RPC classes. Should we add them to the block
> where we set the logging level already, depending on the -d switch?

The RPC logging is only in trunk, and I thought that Stack fixed it
recently (or did he just talk about doing it? I don't remember).

J-D