This looks like a bug in hdfs 0.23 shim later added to 0.23.0 in HDFS-2412
(or or it is compiling against the wrong jars even with -Dhadoop.profile=23)

It seems that hdfs 0.23 moved  FSConstants to HdfsConstants, and in the
process moved the SafeModeAction enum  from FSConstants to
HdfsConstants. When compiled the SafeModeAction enum appears here:

org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction.class.

HDFS-2412 re-adds  FSConstants as a  subclass of  HDFSConstants that
provides a compile time shim.  HBase can compile since it seems to
 "inherit" the enums from HdfsConstants.  However at run time, the master
process's classloader is looking for enum org.apache.hadoop.hdfs.
protocol.FSConstants$SafeModeAction, which is actually in HdfsConstants,
and fails!

If it is the "inherit" thing, it seems that the classloader doesn't check
super classes to see if the enums are present.

I'll try inheriting from the enum in the FSConstants shim to see, but this
still leaves HBase 0.94 in bad shape on hdfs 0.23.0, 0.23.1.

If this is considered a blocker for an 0.94 release, we could do some
reflection stuff.  Alternately, we could just have 0.94 not support 0.23
and say we it on hdfs 0.23.2  (or whenever that patch gets in).

I believe the 0.92 line suffers from this as well. (have to figure out how
I got my version up and running).

Jon.

On Fri, Mar 30, 2012 at 1:01 PM, Jonathan Hsieh <[email protected]> wrote:

> So the apache hbase 0.92.1 release jars also has problems against hadoop
> 0.23.0.
>
> Old 0.20.x/1.0.x MR jobs need to be recompiled for 0.23 (some classes
> changed to interfaces).  This means RowCounter and some of the HBase MR
> jobs are likely broken against 0.23.
>
> At least in my situation (haven't not build 0.94 against hadoop 0.23.0) my
> guess is that the HDFS problem may be something similar and may require a
> recompile as well.
>
> Back to digging...
>
> Jon.
>
>
> On Fri, Mar 30, 2012 at 10:47 AM, lars hofhansl <[email protected]>wrote:
>
>> And it works fine with 0.92.1?
>> I think that would sink this RC.
>>
>> -- Lars
>>
>>
>>
>> ________________________________
>>  From: Ramkrishna.S.Vasudevan <[email protected]>
>> To: [email protected]
>> Cc: 'lars hofhansl' <[email protected]>
>> Sent: Friday, March 30, 2012 6:03 AM
>> Subject: RE: ANN: The first hbase 0.94.0 release candidate is available
>> for download
>>
>> Hi
>>
>> When we tried to start the 0.94 version with hadoop 0.23.1 we got the
>> following exception stack trace.. Even 0.92.2 snapshot also had the same
>> problem.
>>
>> 2012-03-30 11:12:19,487 FATAL org.apache.hadoop.hbase.master.HMaster:
>> Unhandled exception. Starting shutdown.
>> java.lang.NoClassDefFoundError:
>> org/apache/hadoop/hdfs/protocol/FSConstants$SafeModeAction
>>         at
>> org.apache.hadoop.hbase.util.FSUtils.waitOnSafeMode(FSUtils.java:524)
>>         at
>>
>> org.apache.hadoop.hbase.master.MasterFileSystem.checkRootDir(MasterFileSyste
>> m.java:324)
>>         at
>>
>> org.apache.hadoop.hbase.master.MasterFileSystem.createInitialFileSystemLayou
>> t(MasterFileSystem.java:127)
>>         at
>>
>> org.apache.hadoop.hbase.master.MasterFileSystem.<init>(MasterFileSystem.java
>> :112)
>>         at
>>
>> org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:496
>> )
>>         at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:363)
>>         at java.lang.Thread.run(Thread.java:662)
>> Kristam Subba Swathi 00902724(k00902724) 2012-03-30 11:34:41
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.hadoop.hdfs.protocol.FSConstants$SafeModeAction
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>         ... 7 more
>>
>> I tried to build a jar with profile as 23 but still could not resolve
>> this.
>> Am I doing some mistake with this?
>>
>> Regards
>> Ram
>>
>> > -----Original Message-----
>> > From: Todd Lipcon [mailto:[email protected]]
>> > Sent: Thursday, March 29, 2012 9:27 PM
>> > To: [email protected]
>> > Cc: lars hofhansl
>> > Subject: Re: ANN: The first hbase 0.94.0 release candidate is available
>> > for download
>> >
>> > To be clear, a rolling restart from 90 to 94 isn't expected to work.
>> > But a shutdown and restart ought to. (If not, like Jon said, we'll be
>> > fixing it)
>> >
>> > -Todd
>> >
>> > On Wed, Mar 28, 2012 at 10:04 PM, Ramkrishna.S.Vasudevan
>> > <[email protected]> wrote:
>> > > Thanks Lars and Jon.
>> > >
>> > > I too expect the same to work.  I will try testing it that way.
>> > >
>> > > Regards
>> > > Ram
>> > >
>> > >> -----Original Message-----
>> > >> From: lars hofhansl [mailto:[email protected]]
>> > >> Sent: Thursday, March 29, 2012 10:27 AM
>> > >> To: [email protected]
>> > >> Subject: Re: ANN: The first hbase 0.94.0 release candidate is
>> > available
>> > >> for download
>> > >>
>> > >> I am not aware of anything that was removed from 0.94 that would
>> > >> prevent that.
>> > >> So to the extent that 0.90 can be upgraded in place to 0.92 it
>> > should
>> > >> be possible to upgrade in 0.90 in place to 0.94.
>> > >>
>> > >> -- Lars
>> > >>
>> > >>
>> > >>
>> > >> ----- Original Message -----
>> > >> From: Ramkrishna.S.Vasudevan <[email protected]>
>> > >> To: [email protected]
>> > >> Cc:
>> > >> Sent: Wednesday, March 28, 2012 9:44 PM
>> > >> Subject: RE: ANN: The first hbase 0.94.0 release candidate is
>> > available
>> > >> for download
>> > >>
>> > >> Is it possible to upgrade from 0.90 to 0.94? Or should I upgrade to
>> > >> 0.92 and
>> > >> then only do a rolling restart to 0.94?
>> > >>
>> > >> Regards
>> > >> Ram
>> > >>
>> > >> > -----Original Message-----
>> > >> > From: [email protected] [mailto:[email protected]]
>> > >> > Sent: Thursday, March 29, 2012 9:50 AM
>> > >> > To: [email protected]
>> > >> > Cc: [email protected]
>> > >> > Subject: Re: ANN: The first hbase 0.94.0 release candidate is
>> > >> available
>> > >> > for download
>> > >> >
>> > >> > I only used 0.94 for 20 minutes :-)
>> > >> >
>> > >> > It worked during that time. So yes to all questions.
>> > >> >
>> > >> >
>> > >> >
>> > >> > On Mar 28, 2012, at 9:14 PM, Stack <[email protected]> wrote:
>> > >> >
>> > >> > > Is it working for you Ted?  You going to +1 it?  You running on
>> > >> > hadoop 0.22?
>> > >> > > St.Ack
>> > >> > >
>> > >> > > On Wed, Mar 28, 2012 at 6:28 PM, Ted Yu <[email protected]>
>> > >> wrote:
>> > >> > >> The second scenario.
>> > >> > >>
>> > >> > >> Thanks
>> > >> > >>
>> > >> > >> On Wed, Mar 28, 2012 at 6:26 PM, lars hofhansl
>> > >> <[email protected]>
>> > >> > wrote:
>> > >> > >>
>> > >> > >>> HBASE-5258 is not in 0.94. Did you mean a different one?
>> > >> > >>>
>> > >> > >>> Or are you saying that you deployed HBASE-5258 locally to your
>> > >> 0.92
>> > >> > >>> version, and that that was the reason you could not test
>> > rolling
>> > >> > upgrade to
>> > >> > >>> 0.94?
>> > >> > >>>
>> > >> > >>> Thanks.
>> > >> > >>>
>> > >> > >>> -- Lars
>> > >> > >>>
>> > >> > >>>
>> > >> > >>>
>> > >> > >>> ________________________________
>> > >> > >>>  From: Ted Yu <[email protected]>
>> > >> > >>> To: [email protected]
>> > >> > >>> Sent: Wednesday, March 28, 2012 5:11 PM
>> > >> > >>> Subject: Re: ANN: The first hbase 0.94.0 release candidate is
>> > >> > available
>> > >> > >>> for download
>> > >> > >>>
>> > >> > >>> The change was for HBASE-5258
>> > >> > >>>
>> > >> > >>> Incompatibility was expected.
>> > >> > >>>
>> > >> > >>> Thanks
>> > >> > >>>
>> > >> > >>> On Wed, Mar 28, 2012 at 5:01 PM, Stack <[email protected]>
>> > wrote:
>> > >> > >>>
>> > >> > >>>> On Wed, Mar 28, 2012 at 3:54 PM, Ted Yu <[email protected]>
>> > >> > wrote:
>> > >> > >>>>> I planned to perform rolling restart from (our variant of)
>> > 0.92
>> > >> > to
>> > >> > >>> 0.94.0
>> > >> > >>>>> but found out that some internal changes prevented region
>> > >> server
>> > >> > to
>> > >> > >>> talk
>> > >> > >>>> to
>> > >> > >>>>> 0.94.0 master.
>> > >> > >>>>
>> > >> > >>>> What changes?  Do you have logs from that time?
>> > >> > >>>> St.Ack
>> > >> > >>>>
>> > >> > >>>
>> > >
>> >
>> >
>> >
>> > --
>> > Todd Lipcon
>> > Software Engineer, Cloudera
>>
>
>
>
> --
> // Jonathan Hsieh (shay)
> // Software Engineer, Cloudera
> // [email protected]
>
>
>


-- 
// Jonathan Hsieh (shay)
// Software Engineer, Cloudera
// [email protected]

Reply via email to