Apache9 commented on code in PR #5998:
URL: https://github.com/apache/hbase/pull/5998#discussion_r1644518339
##########
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java:
##########
@@ -970,4 +986,18 @@ public ClientTrustStoreInitializationException(String
message, Throwable cause)
super(message, cause);
}
}
+
+ public void close() {
+ try {
+ // We may not have set an explicit connection manager, so we need to use
this.
+ httpClient.getConnectionManager().shutdown();
+ } catch (Exception e) {
+ LOG.info("Exception while shutting down connection manager", e);
+ }
+ }
+
+ @Override
+ public void finalize() {
Review Comment:
Seems it is not suggested to use finalize in modern java application. Is
this necessary?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]