This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f6ad4d9218 HBASE-29234 Handle 
java.lang.reflect.InaccessibleObjectException in HFileSystem (#6869)
1f6ad4d9218 is described below

commit 1f6ad4d921858bb36f2168352b31950347f9e31f
Author: Istvan Toth <[email protected]>
AuthorDate: Tue Apr 1 12:26:24 2025 +0200

    HBASE-29234 Handle java.lang.reflect.InaccessibleObjectException in 
HFileSystem (#6869)
    
    Signed-off-by: Duo Zhang <[email protected]>
---
 .../src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java       | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
index f893e6d73c4..022e6f4a6b4 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
@@ -23,6 +23,7 @@ import edu.umd.cs.findbugs.annotations.Nullable;
 import java.io.Closeable;
 import java.io.IOException;
 import java.lang.reflect.Field;
+import java.lang.reflect.InaccessibleObjectException;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -338,10 +339,7 @@ public class HFileSystem extends FilterFileSystem {
       nf.set(dfsc, cp1);
       LOG.info("Added intercepting call to namenode#getBlockLocations so can 
do block reordering"
         + " using class " + lrb.getClass().getName());
-    } catch (NoSuchFieldException e) {
-      LOG.warn("Can't modify the DFSClient#namenode field to add the location 
reorder.", e);
-      return false;
-    } catch (IllegalAccessException e) {
+    } catch (NoSuchFieldException | IllegalAccessException | 
InaccessibleObjectException e) {
       LOG.warn("Can't modify the DFSClient#namenode field to add the location 
reorder.", e);
       return false;
     }

Reply via email to