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 288fc3eb9f6..410472e69ce 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 @@ -1717,7 +1717,8 @@ public class DataNode extends ReconfigurableBase throw new AccessControlException( "Can't continue with getBlockLocalPathInfo() " + "authorization. The user " + currentUser - + " is not allowed to call getBlockLocalPathInfo"); + + " is not configured in " + + DFSConfigKeys.DFS_BLOCK_LOCAL_PATH_ACCESS_USER_KEY); } } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java index 299865b146d..067b8ce3036 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/shortcircuit/TestShortCircuitLocalRead.java @@ -375,10 +375,12 @@ public class TestShortCircuitLocalRead { try { proxy.getBlockLocalPathInfo(blk, token); Assert.fail("The call should have failed as this user " - + " is not allowed to call getBlockLocalPathInfo"); + + " is not configured in " + + DFSConfigKeys.DFS_BLOCK_LOCAL_PATH_ACCESS_USER_KEY); } catch (IOException ex) { Assert.assertTrue(ex.getMessage().contains( - "not allowed to call getBlockLocalPathInfo")); + "not configured in " + + DFSConfigKeys.DFS_BLOCK_LOCAL_PATH_ACCESS_USER_KEY)); } } finally { fs.close();