[
https://issues.apache.org/jira/browse/HIVE-16844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16056902#comment-16056902
]
Sunitha Beeram commented on HIVE-16844:
---------------------------------------
[~sankarh] I am running into some issue fixing the unit tests and wondering if
you have some input. I tried using an approach similar to what you did to fix
the failures in TestReplicationScenariosAcrossInstances : ie, use the same
configuration, but a different source and destination db name. However, the
serialize and deserialize methods encode/decode the db and table names. I was
able to work around them somewhat for:
org.apache.hive.hcatalog.api.TestHCatClient.testTableSchemaPropagation (by
resetting the target dbname via HCatTable interface)
and
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionSpecRegistrationWithCustomSchema
(by doing a string replace of dbName on the partition-spec string).
But for
org.apache.hive.hcatalog.api.TestHCatClient.testPartitionRegistrationWithCustomSchema,
I have hit a block; I can't update the dbname through the HCatAddPartitionDesc
APIs nor HCatPartition APIs. I could add methods to either of these to update
the dbname (HCatTable allows that), but I am beginning to wonder if this is
right approach.
Running multiple instances of Metastore within the same JVM is probably error
prone as there could be other static variables in classes that might have
unintended sharing, similar to how it has been an issue with this tests that
this change broke. Are we better off handling these tests via integration tests
and not unit tests? The other option might be to mock out the db completely.
Let me know if you have further input on this. Thanks!
> Fix Connection leak in ObjectStore when new Conf object is used
> ---------------------------------------------------------------
>
> Key: HIVE-16844
> URL: https://issues.apache.org/jira/browse/HIVE-16844
> Project: Hive
> Issue Type: Bug
> Components: Metastore
> Reporter: Sunitha Beeram
> Assignee: Sunitha Beeram
> Fix For: 3.0.0
>
> Attachments: HIVE-16844.1.patch
>
>
> The code path in ObjectStore.java currently leaks BoneCP (or Hikari)
> connection pools when a new configuration object is passed in. The code needs
> to ensure that the persistence-factory is closed before it is nullified.
> The relevant code is
> [here|https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L290].
> Note that pmf is set to null, but the underlying connection pool is not
> closed.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)