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 2012/02/24 20:53:41 UTC

IllegalArgumentException when using graceful_stop.sh

Hi,
For HBase 0.92, we're seeing the following exception:

$ ./graceful_stop.sh $(hostname --long)
…

12/02/24 12:27:26 INFO region_mover: Moving 77 region(s) from
phxaishdc10dn0237.phx.ebay.com,60020,1330110667352 during this cycle
12/02/24 12:27:26 INFO region_mover: Moving region
126b96c3f1432ebe752ab4fb71fa7e80 (0 of 77) to server=a.e.com
,60020,1328917535345
NativeException: java.lang.IllegalArgumentException: Wrong FS: hdfs://
a.e.com/hbase/item_active_3600, expected: file:///
  isSuccessfulScan at /apache/hbase/bin/region_mover.rb:132
           __for__ at /apache/hbase/bin/region_mover.rb:330
              call at org/jruby/RubyProc.java:268
              call at org/jruby/RubyProc.java:228
     unloadRegions at /apache/hbase/bin/region_mover.rb:323
            (root) at /apache/hbase/bin/region_mover.rb:434

I wonder why isSuccessfulScan would raise filesystem-related exception.

If you have comment, please share.

Thanks

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Stack <st...@duboce.net>.
On Tue, Feb 28, 2012 at 5:00 PM, Ted Yu <yu...@gmail.com> wrote:
> I added the following at the beginning of getConfiguration():
>  $LOG.info("HBase dir " + config.get(HConstants::HBASE_DIR))
> I saw the correct root directory.
>
> So region_mover.rb picked up config.
>
> FYI
>

So where is it going wrong?  Is this the same Configuration instance
as is reporting wrong fs?  Can you trace more Ted?
St.Ack

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Ted Yu <yu...@gmail.com>.
I added the following at the beginning of getConfiguration():
  $LOG.info("HBase dir " + config.get(HConstants::HBASE_DIR))
I saw the correct root directory.

So region_mover.rb picked up config.

FYI

On Fri, Feb 24, 2012 at 3:45 PM, Stack <st...@duboce.net> wrote:

> On Fri, Feb 24, 2012 at 3:24 PM, Ted Yu <yu...@gmail.com> wrote:
> > So the following from hbase-site.xml is of no use ?
> >
> >  <name>hbase.rootdir</name>
> >  <value>hdfs://a.e.com/hbase</value>
> >
>
> We take that and set its scheme as default fs usually.  Its not
> happening in the script.  I thought the stuff I pasted earlier would
> help.  Ask the Configuration object what it thinks default scheme/fs
> is.  If its file when hbase-site.xml says otherwise, we're not reading
> it properly or the script needs to set it so.
>
> St.Ack
>

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Stack <st...@duboce.net>.
On Fri, Feb 24, 2012 at 3:24 PM, Ted Yu <yu...@gmail.com> wrote:
> So the following from hbase-site.xml is of no use ?
>
>  <name>hbase.rootdir</name>
>  <value>hdfs://a.e.com/hbase</value>
>

We take that and set its scheme as default fs usually.  Its not
happening in the script.  I thought the stuff I pasted earlier would
help.  Ask the Configuration object what it thinks default scheme/fs
is.  If its file when hbase-site.xml says otherwise, we're not reading
it properly or the script needs to set it so.

St.Ack

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Ted Yu <yu...@gmail.com>.
So the following from hbase-site.xml is of no use ?

  <name>hbase.rootdir</name>
  <value>hdfs://a.e.com/hbase</value>

On Fri, Feb 24, 2012 at 3:22 PM, lars hofhansl <lh...@yahoo.com> wrote:

> Maybe it's the same problem I was seeing with M/R jobs accessing the local
> filesystem when I forgot to include the hadoop/conf directory in the HBase
> classpath?
>
>
>
> ----- Original Message -----
> From: Stack <st...@duboce.net>
> To: dev@hbase.apache.org
> Cc:
> Sent: Friday, February 24, 2012 2:27 PM
> Subject: Re: IllegalArgumentException when using graceful_stop.sh
>
> On Fri, Feb 24, 2012 at 1:59 PM, Ted Yu <yu...@gmail.com> wrote:
> > Thanks Stack for the hint.
> >
> > I still get the same error.
> >
>
> Well, its kinda plain.   It thinks the fs is default file when you
> want it to be hdfs.   Mess around w/ the Configuration.  Check what it
> has.  Has it not read your conf in?
>
> St.Ack
>
>

Re: IllegalArgumentException when using graceful_stop.sh

Posted by lars hofhansl <lh...@yahoo.com>.
Maybe it's the same problem I was seeing with M/R jobs accessing the local filesystem when I forgot to include the hadoop/conf directory in the HBase classpath?



----- Original Message -----
From: Stack <st...@duboce.net>
To: dev@hbase.apache.org
Cc: 
Sent: Friday, February 24, 2012 2:27 PM
Subject: Re: IllegalArgumentException when using graceful_stop.sh

On Fri, Feb 24, 2012 at 1:59 PM, Ted Yu <yu...@gmail.com> wrote:
> Thanks Stack for the hint.
>
> I still get the same error.
>

Well, its kinda plain.   It thinks the fs is default file when you
want it to be hdfs.   Mess around w/ the Configuration.  Check what it
has.  Has it not read your conf in?

St.Ack


Re: IllegalArgumentException when using graceful_stop.sh

Posted by Stack <st...@duboce.net>.
On Fri, Feb 24, 2012 at 1:59 PM, Ted Yu <yu...@gmail.com> wrote:
> Thanks Stack for the hint.
>
> I still get the same error.
>

Well, its kinda plain.   It thinks the fs is default file when you
want it to be hdfs.   Mess around w/ the Configuration.  Check what it
has.  Has it not read your conf in?

St.Ack

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Ted Yu <yu...@gmail.com>.
Thanks Stack for the hint.

I still get the same error.

FYI

On Fri, Feb 24, 2012 at 12:36 PM, Stack <st...@duboce.net> wrote:

> On Fri, Feb 24, 2012 at 11:53 AM, Ted Yu <yu...@gmail.com> wrote:
> > I wonder why isSuccessfulScan would raise filesystem-related exception.
> >
>
> Try setting in getConfiguration() method in region_mover.rb the following:
>
>  c.set("fs.default.name", c.get(HConstants::HBASE_DIR))
>  c.set("fs.defaultFS", c.get(HConstants::HBASE_DIR))
>
> on your new configuration.  See if that makes a diff (My guess is that
> the java stack trace is suppressed and we only see the ruby one).
>
> St.Ack
>

Re: IllegalArgumentException when using graceful_stop.sh

Posted by Stack <st...@duboce.net>.
On Fri, Feb 24, 2012 at 11:53 AM, Ted Yu <yu...@gmail.com> wrote:
> I wonder why isSuccessfulScan would raise filesystem-related exception.
>

Try setting in getConfiguration() method in region_mover.rb the following:

  c.set("fs.default.name", c.get(HConstants::HBASE_DIR))
  c.set("fs.defaultFS", c.get(HConstants::HBASE_DIR))

on your new configuration.  See if that makes a diff (My guess is that
the java stack trace is suppressed and we only see the ruby one).

St.Ack