hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunitha Beeram via Review Board <>
Subject Review Request 60303: HIVE-16908: Update table and partition replication tests to not use 2nd HCat instance
Date Wed, 21 Jun 2017 22:02:26 GMT

This is an automatically generated e-mail. To reply, visit:

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

Bugs: HIVE-16908

Repository: hive-git


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.





mvn test -DTest=TestHCatClient now passes.


Sunitha Beeram

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