You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by sa...@apache.org on 2020/05/01 19:30:16 UTC

[hbase-operator-tools] branch master updated (e6e54aa -> f1532a2)

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

sakthi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git.


    from e6e54aa  HBASE-24222 Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)
     new 12f941d  Revert "HBASE-24222 Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)"
     new f1532a2  HBASE-24222 [HBCK2] Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[hbase-operator-tools] 02/02: HBASE-24222 [HBCK2] Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sakthi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git

commit f1532a2e52b43269fb207440d8df433277ec2405
Author: niuyulin <yu...@gmail.com>
AuthorDate: Fri May 1 14:12:16 2020 -0500

    HBASE-24222 [HBCK2] Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)
    
    Signed-off-by: niuyulin <ni...@xiaomi.com>
    Signed-off-by: Sakthi <sa...@apache.org>
---
 hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java b/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
index dcf88bb..7cda06b 100644
--- a/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
+++ b/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
@@ -125,7 +125,6 @@ import org.apache.hadoop.hbase.replication.ReplicationException;
 import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.replication.ReplicationQueueStorage;
 import org.apache.hadoop.hbase.replication.ReplicationStorageFactory;
-import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Bytes.ByteArrayComparator;
@@ -145,6 +144,7 @@ import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.hadoop.hbase.zookeeper.ZNodePaths;
 import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
 import org.apache.hadoop.ipc.RemoteException;
+import org.apache.hadoop.security.AccessControlException;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.hadoop.util.Tool;
@@ -2450,7 +2450,7 @@ public class HBaseFsck extends Configured implements Closeable {
     }
   }
 
-  private void preCheckPermission() throws IOException, AccessDeniedException {
+  private void preCheckPermission() throws IOException {
     if (shouldIgnorePreCheckPermission()) {
       return;
     }
@@ -2462,8 +2462,8 @@ public class HBaseFsck extends Configured implements Closeable {
     FileStatus[] files = fs.listStatus(hbaseDir);
     for (FileStatus file : files) {
       try {
-        FSUtils.checkAccess(ugi, file, FsAction.WRITE);
-      } catch (AccessDeniedException ace) {
+        fs.access(file.getPath(), FsAction.WRITE);
+      } catch (AccessControlException ace) {
         LOG.warn("Got AccessDeniedException when preCheckPermission ", ace);
         errors.reportError(ErrorReporter.ERROR_CODE.WRONG_USAGE, "Current user " +
             ugi.getUserName() + " does not have write perms to " + file.getPath() +


[hbase-operator-tools] 01/02: Revert "HBASE-24222 Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)"

Posted by sa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sakthi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase-operator-tools.git

commit 12f941d7c794bab8ae88d7b948a9d739d05b60ae
Author: Sakthi <sa...@apache.org>
AuthorDate: Fri May 1 12:25:14 2020 -0700

    Revert "HBASE-24222 Remove FSUtils.checkAccess and replace with FileSystem.access in hbase-operator-tools (#58)"
    
    This reverts commit e6e54aa568271c68f03f6833bed1776c80fcc0cd.
---
 hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java b/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
index 7cda06b..dcf88bb 100644
--- a/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
+++ b/hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
@@ -125,6 +125,7 @@ import org.apache.hadoop.hbase.replication.ReplicationException;
 import org.apache.hadoop.hbase.replication.ReplicationPeerDescription;
 import org.apache.hadoop.hbase.replication.ReplicationQueueStorage;
 import org.apache.hadoop.hbase.replication.ReplicationStorageFactory;
+import org.apache.hadoop.hbase.security.AccessDeniedException;
 import org.apache.hadoop.hbase.security.UserProvider;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.Bytes.ByteArrayComparator;
@@ -144,7 +145,6 @@ import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.hadoop.hbase.zookeeper.ZNodePaths;
 import org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException;
 import org.apache.hadoop.ipc.RemoteException;
-import org.apache.hadoop.security.AccessControlException;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.apache.hadoop.util.Tool;
@@ -2450,7 +2450,7 @@ public class HBaseFsck extends Configured implements Closeable {
     }
   }
 
-  private void preCheckPermission() throws IOException {
+  private void preCheckPermission() throws IOException, AccessDeniedException {
     if (shouldIgnorePreCheckPermission()) {
       return;
     }
@@ -2462,8 +2462,8 @@ public class HBaseFsck extends Configured implements Closeable {
     FileStatus[] files = fs.listStatus(hbaseDir);
     for (FileStatus file : files) {
       try {
-        fs.access(file.getPath(), FsAction.WRITE);
-      } catch (AccessControlException ace) {
+        FSUtils.checkAccess(ugi, file, FsAction.WRITE);
+      } catch (AccessDeniedException ace) {
         LOG.warn("Got AccessDeniedException when preCheckPermission ", ace);
         errors.reportError(ErrorReporter.ERROR_CODE.WRONG_USAGE, "Current user " +
             ugi.getUserName() + " does not have write perms to " + file.getPath() +