[ 
https://issues.apache.org/jira/browse/HDFS-10417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tianyin Xu updated HDFS-10417:
------------------------------
    Status: Patch Available  (was: Open)

> Actionable logs 
> ----------------
>
>                 Key: HDFS-10417
>                 URL: https://issues.apache.org/jira/browse/HDFS-10417
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 2.7.2
>            Reporter: Tianyin Xu
>            Priority: Minor
>         Attachments: HDFS-10417.000.patch
>
>
> The exception msg thrown by {{checkBlockLocalPathAccess}} is very specific to 
> the implementation detail. It's really hard for users to understand it unless 
> she reads and understands the code. 
> The code is shown as follows:
> {code:title=org.apache.hadoop.hdfs.server.datanode.DataNode|borderStyle=solid}
>   private void checkBlockLocalPathAccess() throws IOException {
>     checkKerberosAuthMethod("getBlockLocalPathInfo()");
>     String currentUser = 
> UserGroupInformation.getCurrentUser().getShortUserName();
>     if (!usersWithLocalPathAccess.contains(currentUser)) {
>       throw new AccessControlException(
>           "Can't continue with getBlockLocalPathInfo() "
>               + "authorization. The user " + currentUser
>               + " is not allowed to call getBlockLocalPathInfo");
>     }    
>   }
> {code}
> (basically she needs to understand the code logic of getBlockLocalPathInfo)
> \\
> Note that {{usersWithLocalPathAccess}} is a *private final* purely coming 
> from the configuration settings of {{dfs.block.local-path-access.user}},
> {code:title=org.apache.hadoop.hdfs.server.datanode.DataNode|borderStyle=solid}
> private final List<String> usersWithLocalPathAccess;
> ....
> this.usersWithLocalPathAccess = Arrays.asList(
>     
> conf.getTrimmedStrings(DFSConfigKeys.DFS_BLOCK_LOCAL_PATH_ACCESS_USER_KEY));
> {code}
> In other word, the checking fails simply because the current user is not 
> specified in the configuration setting of 
> {{dfs.block.local-path-access.user}}. The log message should be much more 
> clearer to make it easy for users to take actions, as demonstrated in the 
> attached patch. 
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to