diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a7d16689..867c17d6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ +## [3.11.7] - 2023-11-30 +### Changed +- Fixed log statement that was not logging the exception correctly. +- Removed client.shutdown() call, this always throws an exception and the code ends up closing the transport directly. + ## [3.11.6] - 2023-10-24 ### Fixed - Switch to ExecutorService instead of the default `ForkJoinPool` for `MetastoreMappingImpl.isAvailable()` calls. Using `ForkJoinPool` may cause threads to wait on each other. diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java index c20c87cfd..c7a0c67af 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/ThriftMetastoreClientManager.java @@ -246,15 +246,6 @@ public void close() { return; } isConnected = false; - try { - if (client != null) { - client.shutdown(); - } - } catch (TException e) { - LOG.debug("Unable to shutdown metastore client. Will try closing transport directly.", e); - } - // Transport would have got closed via client.shutdown(), so we don't need this, but - // just in case, we make this call. if ((transport != null) && transport.isOpen()) { transport.close(); transport = null; diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/compatibility/HiveCompatibleThriftHiveMetastoreIfaceFactory.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/compatibility/HiveCompatibleThriftHiveMetastoreIfaceFactory.java index e0e84f46d..3ce8ee3f5 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/compatibility/HiveCompatibleThriftHiveMetastoreIfaceFactory.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/client/compatibility/HiveCompatibleThriftHiveMetastoreIfaceFactory.java @@ -66,8 +66,8 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl } catch (Throwable t) { log .warn( - "Unable to invoke compatibility for metastore client method {}. Will rethrow original exception, logging exception from invocation handler", - method.getName(), t); + "Unable to invoke compatibility for metastore client method "+method.getName()+". Will rethrow original exception, logging exception from invocation handler", + t); } throw delegateException.getCause(); } diff --git a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java index 77b2d3c90..9305fffd5 100644 --- a/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java +++ b/waggle-dance-core/src/main/java/com/hotels/bdp/waggledance/server/FederatedHMSHandler.java @@ -1371,7 +1371,7 @@ public void alter_partitions_with_environment_context( mapping .getClient() .alter_partitions_with_environment_context(mapping.transformInboundDatabaseName(db_name), tbl_name, - mapping.transformInboundPartitions(new_parts), environment_context); + mapping.transformInboundPartitions(new_parts), environment_context); } @Override