Skip to content

Commit 3c0988a

Browse files
HDFS-17452 : DfsRouterAdmin RefreshCallQueue fails when authorization is enabled
1 parent 59d5e0b commit 3c0988a

File tree

1 file changed

+5
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation

1 file changed

+5
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,7 +1364,12 @@ public int genericRefresh(String[] argv, int i) throws IOException {
13641364
* @throws IOException if the operation was not successful.
13651365
*/
13661366
private int refreshCallQueue() throws IOException {
1367+
// for security authorization
1368+
// server principal for this call
1369+
// should be Routers's one.
13671370
Configuration conf = getConf();
1371+
conf.set(CommonConfigurationKeys.HADOOP_SECURITY_SERVICE_USER_NAME_KEY,
1372+
conf.get(RBFConfigKeys.DFS_ROUTER_KERBEROS_PRINCIPAL_KEY, ""));
13681373
String hostport = getConf().getTrimmed(
13691374
RBFConfigKeys.DFS_ROUTER_ADMIN_ADDRESS_KEY,
13701375
RBFConfigKeys.DFS_ROUTER_ADMIN_ADDRESS_DEFAULT);

0 commit comments

Comments
 (0)