From 3cacf1ce565ce151524d4f61ab7c01a718eb534d Mon Sep 17 00:00:00 2001 From: Xiaoyu Yao Date: Wed, 13 May 2020 11:47:19 -0700 Subject: [PATCH] HDFS-15344. DataNode#checkSuperuserPrivilege should use UGI#getGroups after HADOOP-13442. (#2004) --- .../java/org/apache/hadoop/hdfs/server/datanode/DataNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java index c772d8fe38..20ea7c79cf 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java @@ -1082,7 +1082,7 @@ public class DataNode extends ReconfigurableBase } // Is the user a member of the super group? - List groups = Arrays.asList(callerUgi.getGroupNames()); + List groups = callerUgi.getGroups(); if (groups.contains(supergroup)) { return; }