This is an automated email from the ASF dual-hosted git repository. krisztiankasa pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push: new b90c08a HIVE-24149. HiveStreamingConnection doesn't close HMS connection (Attila Magyar, reviewed by Krisztian Kasa) b90c08a is described below commit b90c08ade363236d196e343b581e8ebda208e5e3 Author: Attila Magyar <amag...@hortonworks.com> AuthorDate: Tue Sep 15 09:26:05 2020 +0200 HIVE-24149. HiveStreamingConnection doesn't close HMS connection (Attila Magyar, reviewed by Krisztian Kasa) --- .../src/java/org/apache/hive/streaming/HiveStreamingConnection.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java b/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java index 27dc6f2..521a1b8 100644 --- a/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java +++ b/streaming/src/java/org/apache/hive/streaming/HiveStreamingConnection.java @@ -686,6 +686,12 @@ public class HiveStreamingConnection implements StreamingConnection { if (manageTransactions) { getMSC().close(); getHeatbeatMSC().close(); + try { + // Close the HMS that is used for addWriteNotificationLog + Hive.get(conf).getSynchronizedMSC().close(); + } catch (Exception e) { + LOG.warn("Error while closing HMS connection", e); + } } //remove shutdown hook entry added while creating this connection via HiveStreamingConnection.Builder#connect() if (!ShutdownHookManager.isShutdownInProgress()) {