From 806a7eeeda17bd338dfb626e79fdd4626e63be51 Mon Sep 17 00:00:00 2001 From: wenwj0 <36262341+wenwj0@users.noreply.github.com> Date: Tue, 14 Jun 2022 14:23:27 +0800 Subject: [PATCH] Revert "HBASE-27069 Hbase SecureBulkload permission regression (#4475)" This reverts commit db0695d7ae1c7bf4359c7ec1271d028c7edcb5de. --- .../hadoop/hbase/regionserver/SecureBulkLoadManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java index 214372110704..087f4cd6824a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/SecureBulkLoadManager.java @@ -398,7 +398,10 @@ public String prepareBulkLoad(final byte[] family, final String srcPath, boolean throw new IOException("Failed to move HFile: " + p + " to " + stageP); } } - fs.setPermission(stageP, PERM_ALL_ACCESS); + + if (StringUtils.isNotEmpty(customStaging)) { + fs.setPermission(stageP, PERM_ALL_ACCESS); + } return stageP.toString(); }