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

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


+
Ted Yu 2013-04-29, 14:31
+
Shahab Yunus 2013-04-29, 14:39
Copy link to this message
-
Re: VersionInfoAnnotation Unknown for Hadoop/HBase
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'
>>>>
>>>> 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
+
Shahab Yunus 2013-04-29, 14:54