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

vjasani pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 9f6ec47a697 HBASE-28081 (ADDENDUM) Snapshot working dir does not 
retain ACLs after snapshot commit phase
9f6ec47a697 is described below

commit 9f6ec47a6979b2a709e7d9e4700a06a0f6f0a81b
Author: Viraj Jasani <vjas...@apache.org>
AuthorDate: Sat Sep 30 18:38:50 2023 -0700

    HBASE-28081 (ADDENDUM) Snapshot working dir does not retain ACLs after 
snapshot commit phase
---
 .../org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
index 249ef966186..ac8db8a5925 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java
@@ -38,7 +38,6 @@ import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.stream.Collectors;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.CommonPathCapabilities;
 import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -588,17 +587,14 @@ public class SnapshotManager extends 
MasterProcedureManager implements Stoppable
    */
   private static void updateWorkingDirAclsIfRequired(Path workingDir, 
FileSystem workingDirFS)
     throws IOException {
-    if (
-      !workingDirFS.hasPathCapability(workingDir, 
CommonPathCapabilities.FS_ACLS)
-        || workingDir.getParent() == null || 
workingDir.getParent().getParent() == null
-    ) {
+    if (workingDir.getParent() == null || workingDir.getParent().getParent() 
== null) {
       return;
     }
     AclStatus snapshotWorkingParentDirStatus;
     try {
       snapshotWorkingParentDirStatus =
         workingDirFS.getAclStatus(workingDir.getParent().getParent());
-    } catch (IOException e) {
+    } catch (IOException | UnsupportedOperationException e) {
       LOG.warn("Unable to retrieve ACL status for path: {}, current working 
dir path: {}",
         workingDir.getParent().getParent(), workingDir, e);
       return;

Reply via email to