[ 
https://issues.apache.org/jira/browse/HADOOP-14678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102326#comment-16102326
 ] 

John Zhuge commented on HADOOP-14678:
-------------------------------------

Thanks [~jojochuang] for reviewing the patch!

However, after looking at the code again, I have some doubt about this entire 
section:
{code:java}
    try {
      userName = UserGroupInformation.getCurrentUser().getShortUserName();
    } catch (IOException e) {
      userName = "hadoop";
    }
{code}

[~vishwajeet.dusane] Is there any reason to catch IOE of 
{{UGI.getCurrentUser()}} here?

It is probably not a good idea to swallow it. If you look at [DFS 
code|https://github.com/apache/hadoop/blob/27a1a5fde94d4d7ea0ed172635c146d594413781/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSClient.java#L305],
 there is no catch.

> AdlFilesystem#initialize swallows exception when getting user name
> ------------------------------------------------------------------
>
>                 Key: HADOOP-14678
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14678
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/adl
>    Affects Versions: 3.0.0-alpha2
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>         Attachments: HADOOP-14678.001.patch
>
>
> https://github.com/apache/hadoop/blob/5c61ad24887f76dfc5a5935b2c5dceb6bfd99417/hadoop-tools/hadoop-azure-datalake/src/main/java/org/apache/hadoop/fs/adl/AdlFileSystem.java#L122
> It should log the exception.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to