jojochuang commented on code in PR #5469:
URL: https://github.com/apache/hbase/pull/5469#discussion_r1373685222


##########
hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/util/RecoverLeaseFSUtils.java:
##########
@@ -127,15 +134,16 @@ private static boolean recoverDFSFileLease(final 
DistributedFileSystem dfs, fina
             Thread.sleep(conf.getInt("hbase.lease.recovery.pause", 1000));
             if (findIsFileClosedMeth) {
               try {
+                SafeMode fsWithSafeMode = (SafeMode) fs;
                 isFileClosedMeth =
-                  dfs.getClass().getMethod("isFileClosed", new Class[] { 
Path.class });
+                  fsWithSafeMode.getClass().getMethod("isFileClosed", new 
Class[] { Path.class });

Review Comment:
   This reflection is not needed. LeaseRecoverable has isFileClosed()



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

Reply via email to