hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahab Yunus <shahab.yu...@gmail.com>
Subject Re: VersionInfoAnnotation Unknown for Hadoop/HBase
Date Mon, 29 Apr 2013 15:22:21 GMT
Yes, this indeed seem to be the case. After running java -version and
seeing 1.5 it rung a bell because all our servers (as far as I knew) were
1.6 or above. So I never thought that this would be any issue!! But boy I
was wrong and it indeed turned out to be something so obvious. Thanks guys
for your prompt responses and help. I feel embarrassed to bother all for
such an issue :/

I ran all of these commands on machines which actually had Java 1.6 or 1.7
and they work.

Regards,
Shahab


On Mon, Apr 29, 2013 at 11:05 AM, Harsh J <harsh@cloudera.com> wrote:

> Well… Bingo! :)
>
> We don't write our projects for 1.5 JVMs, and especially not the GCJ
> (1.5 didn't have annotations either IIRC? We depend on that here). Try
> with a Sun/Oracle/OpenJDK 1.6 or higher and your problem is solved.
>
> On Mon, Apr 29, 2013 at 8:24 PM, Shahab Yunus <shahab.yunus@gmail.com>
> wrote:
> > The output of "java -version" is:
> >
> > java -version
> > java version "1.5.0"
> > gij (GNU libgcj) version 4.4.6 20120305 (Red Hat 4.4.6-4)
> >
> > Copyright (C) 2007 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is
> NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
> > --------------------------------------------------
> >
> > Also, when I run:
> >
> > "hbase org.apache.hadoop.hbase.util.VersionInfo"
> >
> > I do get the correct output:
> > 3/04/29 09:50:26 INFO util.VersionInfo: HBase 0.92.1-cdh4.1.2
> > 13/04/29 09:50:26 INFO util.VersionInfo: Subversion
> >
> file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.92.1-cdh4.1.2
> > -r Unknown
> > 13/04/29 09:50:26 INFO util.VersionInfo: Compiled by jenkins on Thu Nov
>  1
> > 18:01:09 PDT 2012
> >
> > This is strange and because of this I am unable to run my java client
> which
> > errores out as mentioned with the following:
> > java.lang.RuntimeException: hbase-default.xml file seems to be for and
> old
> > version of HBase (0.92.1-cdh4.1.2), this version is Unknown
> >    at
> >
> org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:68)
> >
> > Regards,
> > Shahab
> >
> >
> > On Mon, Apr 29, 2013 at 10:50 AM, Harsh J <harsh@cloudera.com> wrote:
> >>
> >> This is rather odd and am unable to reproduce this across several
> >> versions. It may even be something to do with all that static loading
> >> done in the VersionInfo class but am unsure at the moment.
> >>
> >> What does "java -version" print for you?
> >>
> >> On Mon, Apr 29, 2013 at 8:12 PM, Shahab Yunus <shahab.yunus@gmail.com>
> >> wrote:
> >> > Okay, I think I know what you mean. Those were back ticks!
> >> >
> >> > So I tried the following:
> >> >
> >> > java  -cp `hbase classpath` org.apache.hadoop.hbase.util.VersionInfo
> >> >
> >> > and I still get:
> >> >
> >> > 13/04/29 09:40:31 INFO util.VersionInfo: HBase Unknown
> >> > 13/04/29 09:40:31 INFO util.VersionInfo: Subversion Unknown -r Unknown
> >> > 13/04/29 09:40:31 INFO util.VersionInfo: Compiled by Unknown on
> Unknown
> >> >
> >> > I did print `hbase classpath` on the console itself and it does print
> >> > paths
> >> > to various libs and jars.
> >> >
> >> > Regards,
> >> > Shahab
> >> >
> >> >
> >> > On Mon, Apr 29, 2013 at 10:39 AM, Shahab Yunus <
> shahab.yunus@gmail.com>
> >> > wrote:
> >> >>
> >> >> Ted, Sorry I didn't understand. What do you mean exactly by
> "specifying
> >> >> `hbase classpath` "? You mean declare a environment variable
> >> >> 'HBASE_CLASSPATH'?
> >> >>
> >> >> Regards,
> >> >> Shaahb
> >> >>
> >> >>
> >> >> On Mon, Apr 29, 2013 at 10:31 AM, Ted Yu <yuzhihong@gmail.com>
> wrote:
> >> >>>
> >> >>> bq. 'java  -cp /usr/lib/hbase/hbase...
> >> >>>
> >> >>> Instead of hard coding class path, can you try specifying `hbase
> >> >>> classpath` ?
> >> >>>
> >> >>> Cheers
> >> >>>
> >> >>>
> >> >>> On Mon, Apr 29, 2013 at 5:52 AM, Shahab Yunus <
> shahab.yunus@gmail.com>
> >> >>> wrote:
> >> >>>>
> >> >>>> Hello,
> >> >>>>
> >> >>>> This might be something very obvious that I am missing but
this has
> >> >>>> been
> >> >>>> bugging me and I am unable to find what am I missing?
> >> >>>>
> >> >>>> I have hadoop and hbase installed on Linux machine. Version
> >> >>>> 2.0.0-cdh4.1.2 and 0.92.1-cdh4.1.2 respectively. They are working
> and
> >> >>>> I can
> >> >>>> invoke hbase shell and hadoop commands.
> >> >>>>
> >> >>>> When I give the following command:
> >> >>>>
> >> >>>> 'hbase version'
> >> >>>>
> >> >>>> I get the following output which is correct and expected:
> >> >>>> -----------------------
> >> >>>> 13/04/29 07:47:42 INFO util.VersionInfo: HBase 0.92.1-cdh4.1.2
> >> >>>> 13/04/29 07:47:42 INFO util.VersionInfo: Subversion
> >> >>>>
> >> >>>>
> file:///data/1/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hbase-0.92.1-cdh4.1.2
> >> >>>> -r Unknown
> >> >>>> 13/04/29 07:47:42 INFO util.VersionInfo: Compiled by jenkins
on Thu
> >> >>>> Nov
> >> >>>> 1 18:01:09 PDT 2012
> >> >>>>
> >> >>>> But when I I kick of the VersionInfo class manually (I do see
that
> >> >>>> there
> >> >>>> is a main method in there), I get an Unknown result? Why is
that?
> >> >>>> Command:
> >> >>>> 'java  -cp
> >> >>>>
> >> >>>>
> /usr/lib/hbase/hbase-0.92.1-cdh4.1.2-security.jar:/usr/lib/hbase/lib/commons-logging-1.1.1.jar
> >> >>>> org.apache.hadoop.hbase.util.VersionInfo'
> >> >>>>
> >> >>>> Output:
> >> >>>> -----------------------
> >> >>>> Apr 29, 2013 7:48:41 a.m. org.apache.hadoop.hbase.util.VersionInfo
> >> >>>> logVersion
> >> >>>> INFO: HBase Unknown
> >> >>>> Apr 29, 2013 7:48:41 a.m. org.apache.hadoop.hbase.util.VersionInfo
> >> >>>> logVersion
> >> >>>> INFO: Subversion Unknown -r Unknown
> >> >>>> Apr 29, 2013 7:48:41 a.m. org.apache.hadoop.hbase.util.VersionInfo
> >> >>>> logVersion
> >> >>>> INFO: Compiled by Unknown on Unknown
> >> >>>>
> >> >>>> Now this is causing problems when I am trying to run my HBase
> client
> >> >>>> on
> >> >>>> this machine as the it aborts with the following error:
> >> >>>> -----------------------
> >> >>>> java.lang.RuntimeException: hbase-default.xml file seems to
be for
> >> >>>> and
> >> >>>> old version of HBase (0.92.1-cdh4.1.2), this version is Unknown
> >> >>>>    at
> >> >>>>
> >> >>>>
> org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:68)
> >> >>>>
> >> >>>> This means that the hbase-default.xml in the hbase jar is being
> >> >>>> picked
> >> >>>> up but the version info captured/compiled through annotations
is
> not?
> >> >>>> How is
> >> >>>> it possible if 'hbase shell' (or hadoop version') works fine!
> >> >>>>
> >> >>>> Please advise. Thanks a lot. I will be very grateful.
> >> >>>>
> >> >>>> Regards,
> >> >>>> Shahab
> >> >>>
> >> >>>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Harsh J
> >
> >
>
>
>
> --
> Harsh J
>

Mime
View raw message