hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Beeram via Review Board <nore...@reviews.apache.org>
Subject Re: Review Request 60303: HIVE-16908: Update table and partition replication tests to not use 2nd HCat instance
Date Thu, 22 Jun 2017 00:59:05 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60303/
-----------------------------------------------------------

(Updated June 22, 2017, 12:59 a.m.)


Review request for hive, Carl Steinbach, Anthony Hsu, and Ratandeep Ratti.


Bugs: HIVE-16908
    https://issues.apache.org/jira/browse/HIVE-16908


Repository: hive-git


Description
-------

HIVE-16908: Update table and partition replication tests to not use 2nd HCat instance

HIVE-16844 fixed a connection leak issue which subsequently exposed failures in TestHCatClient.
The connection leak gets triggered if a metastore instance is updated with a different JDO
configuration. TestHCatClient uses 2 metastore instances to test replication related methods.
Unfortunately, it does so by providing a different derby db name for the second instance.
Since the 2 metastores run in the same JVM, the path fixed in HIVE-16844 gets triggered, resulting
in "sourceMetastore"'s connection being closed and thus resulting in failures.

It appears to me that running 2 metastore instances within the same JVM is error prone as
there could be unintentional side-effects due to statics in the code (as was exposed by fixing
HIVE-16844). This patch provides a way to test the replication related methods without involving
a second instance. The changes mainly validate the serialize/deserialize methods. One of the
tests, testPartitionRegistrationWithCustomSchema, uses addPartitions method to verify propogation
of changes and it appeared that addPartitions wasn't covered by other tests in TestHCatClient
and there wasn't a better way to verify the intended path, so I used an approach where the
original database and table are dropped and recreated using the serialized-string and captured
partition spec.


Diffs (updated)
-----

  hcatalog/webhcat/java-client/src/test/java/org/apache/hive/hcatalog/api/TestHCatClient.java
86d3acbcb462d244fa2dc2f48923aab1e3ccee66 


Diff: https://reviews.apache.org/r/60303/diff/2/

Changes: https://reviews.apache.org/r/60303/diff/1-2/


Testing
-------

mvn test -DTest=TestHCatClient now passes.


Thanks,

Sunitha Beeram


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message