dengzhhu653 commented on code in PR #6462:
URL: https://github.com/apache/hive/pull/6462#discussion_r3359739929


##########
metastore/src/java/org/apache/hadoop/hive/metastore/HiveClientCache.java:
##########
@@ -526,5 +550,24 @@ protected void finalize() throws Throwable {
         super.finalize();
       }
     }
+
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] args) throws 
Throwable {
+      try {
+        // Route methods declared on this class (ICacheableMetaStoreClient 
lifecycle:
+        // acquire, isOpen, tearDown, etc.) to this handler instance rather 
than
+        // delegating to the underlying metastore client.
+        if (method.getDeclaringClass().isAssignableFrom(getClass())) {
+          return method.invoke(this, args);
+        }
+        if (CLOSE_METHODS.contains(method)) {

Review Comment:
   sounds like we can simplify this check to 
`CLOSE_METHOD_NAME.equals(method.getName())`



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to