I also saw this issue. Set configure "hbase.defaults.for.version.skip" to
true in hbase-site.xml(assuming hbase-site.xml is at very beginning of class
path) to workaround this.

The issue is due to "hbase.defaults.for.version" for hadoop2 client jar is
set as "0.98.1-hadoop1" in distribution package.

From:  John Hancock <[email protected]>
Reply-To:  <[email protected]>
Date:  Sunday, April 13, 2014 11:34 AM
To:  <[email protected]>
Subject:  phoenix 4.0.0 jar in squirrel sql

I apologize in advance if this is a known issue.  I did some searching but
did not see it reported.

Last night  I used the 4.0.0 binary distribution
phoenix-4.0.0-incubating-client.jar from the hadoop-2 directory in the
binary distribution.

I was trying to connect to HBase 0.98.1 + Hadoop 2.2.0 using Squirrel SQL
but getting the error message:

java.util.concurrent.ExecutionException: java.lang.RuntimeException:
java.lang.RuntimeException: hbase-default.xml file seems to be for and old
version of HBase (0.98.1-hadoop1), this version is 0.98.1-hadoop2

So, I built phoenix-4.0.0-incubating-client.jar from source using the
directions in BUILDING in the root of the 4.0.0 distribution tarball.

I am able to use Squirrel SQL to connect now.

I unzippped the binary phoenix-4.0.0-incubating-client.jar and took a look
in hbase-defaults.xml.  I noticed base.defaults.for.version.skip is set to
false in this file:

 <property>
    <name>hbase.defaults.for.version.skip</name>
    <value>false</value>
    <description>Set to true to skip the 'hbase.defaults.for.version' check.
    Setting this to true can be useful in contexts other than
    the other side of a maven generation; i.e. running in an
    ide.  You'll want to set this boolean to true to avoid
    seeing the RuntimException complaint: "hbase-default.xml file
    seems to be for and old version of HBase (\${hbase.version}), this
    version is X.X.X-SNAPSHOT"</description>
  </property>

I tried changing this value, then using jar to re-create
phoenix-4.0.0-incubating-client.jar but still got the error reported above
when I tried to use it with Squirrel SQL.

However, I notice that the same property has a different value in the source
distribution:

  <property>
    <name>hbase.defaults.for.version.skip</name>
    <value>true</value>
    <description>
    Set to true to skip the 'hbase.defaults.for.version' check.
    Setting this to true can be useful in contexts other than
    the other side of a maven generation; i.e. running in an
    ide.  You'll want to set this boolean to true to avoid
    seeing the RuntimException complaint: "hbase-default.xml file
    seems to be for and old version of HBase (@@@VERSION@@@), this
    version is X.X.X-SNAPSHOT"
    </description>
  </property>

In fact, it seems to me this is the only property  that is assigned a value
in hbase-default.xml in the source distribution.

I'm fine with building phoenix from source.

Is the version of phoenix-4.0.0-incubating-client.jar in hadoop-2 the wrong
file?  The md5sum I get is: e6f9e34e3c69dffa68875be701bb3a1f

-John



-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to