[
https://issues.apache.org/jira/browse/PHOENIX-2025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14573805#comment-14573805
]
Geoffrey Jacoby commented on PHOENIX-2025:
------------------------------------------
After talking with [~samarthjain] yesterday I realized that my earlier tests of
removing hbase-default.xml and/or changing it to hbase-site.xml were flawed
because I was running JDK 8. I reran the Phoenix test suites today on a
different machine running JDK 7 with the test hbase-default.xml renamed to
hbase-site.xml, and it looks much better. All integration tests in 4.3 pass,
though two unit tests fail. One of those tests,
WhereCompilerTest.testScanCache_Default fails for a good reason -- it assumes
the scanner cache default to be a Phoenix constant, rather than whatever's in
the real hbase-default.xml.
The other, ConnectionlessTest.testNoConnectionInfo, seems to spin infinitely
trying to get a non-existent ZK quorum even though it's a negative test that
just verifies that the JDBC driver throws an appropriate exception if given a
bad connection string. I'm not sure what's going on there, why it breaks in the
presence of the "real" hbase-common hbase-default.xml, or why the JDBC driver's
even trying to talk to ZK rather than immediately noticing the connection
string's bad.
I'm attaching a patch which includes the hbase XML rename, a fix for the
testScanCache_Default, and an Ignore for the testNoConnectionInfo for use in
further investigation by the community.
> Phoenix-core's hbase-default.xml prevents HBaseTestingUtility from starting
> up in client apps
> ---------------------------------------------------------------------------------------------
>
> Key: PHOENIX-2025
> URL: https://issues.apache.org/jira/browse/PHOENIX-2025
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.3.0
> Reporter: Geoffrey Jacoby
>
> Phoenix seems to have long had its own version of hbase-default.xml as a test
> resource in phoenix-core with a single setting to override
> hbase.defaults.for.version.skip to true. Sometime around Phoenix 4.3,
> phoenix-core seems to have been split into a main jar and a test jar, and the
> hbase-default.xml went into the test jar.
> The odd result of this is that in client apps that include the test jar, the
> classloader in HBaseConfiguration.create() now sees Phoenix's
> hbase-default.xml, rather than HBase's, and creates a Configuration object
> without HBase's defaults. One major consequence of this is that the
> HBaseTestingUtility can't start up, because it relies on those HBase defaults
> being set. This is a huge problem in a client app that includes the
> phoenix-core test jar in order to make use of the PhoenixTestDriver and
> BaseTest classes; the upgrade to 4.3 breaks all tests using the
> HBaseTestingUtility.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)