You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2022/01/18 12:33:08 UTC
[hbase] branch master updated: HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)
This is an automated email from the ASF dual-hosted git repository.
wchevreuil 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 4a94cfc HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)
4a94cfc is described below
commit 4a94cfccc9150218364c6800f2f099a878d07bb7
Author: Wellington Ramos Chevreuil <wc...@apache.org>
AuthorDate: Tue Jan 18 12:32:27 2022 +0000
HBASE-26662 User.createUserForTesting should not reset UserProvider.groups every time if hbase.group.service.for.test.only is true (#4029)
Signed-off-by: Josh Elser <el...@apache.org>
Signrd-off-by: Duo Zhang <zh...@apache.org>
---
hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
index 97d80ba..f88f65a 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java
@@ -351,8 +351,7 @@ public abstract class User {
public static User createUserForTesting(Configuration conf,
String name, String[] groups) {
synchronized (UserProvider.class) {
- if (!(UserProvider.groups instanceof TestingGroups) ||
- conf.getBoolean(TestingGroups.TEST_CONF, false)) {
+ if (!(UserProvider.groups instanceof TestingGroups)) {
UserProvider.groups = new TestingGroups(UserProvider.groups);
}
}