Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hadoop >> mail # user >> Re: VersionInfoAnnotation Unknown for Hadoop/HBase


Copy link to this message
-
Re: VersionInfoAnnotation Unknown for Hadoop/HBase
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> 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 <[EMAIL PROTECTED]>
> > 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
> >>> 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'