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

Anuhan Torgonshar updated HDFS-14339:
-------------------------------------
    Description: 
There are *inconsistent* log level practices in 
_*hadoop-2.8.5-src/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/**RpcProgramNfs3.java*_.
 
{code:java}
//following log levels are inconsistent with other practices which seems to 
more appropriate
//from line 1814 to 1819 & line 1831 to 1836 in Hadoop-2.8.5 version
try { 
    attr = writeManager.getFileAttr(dfsClient, childHandle, iug); 
} catch (IOException e) { 
    LOG.error("Can't get file attributes for fileId: {}", fileId, e); continue; 
}

//other 2 same practices in this file
//from line 907 to 911 & line 2102 to 2106 
try {
    postOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
} catch (IOException e1) {
    LOG.info("Can't get postOpAttr for fileId: {}", e1);
}

//other 3 similar practices
//from line 1224 to 1227 & line 1139 to 1143 &line 1309 to 1313
try {
    postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
} catch (IOException e1) {
    LOG.info("Can't get postOpDirAttr for {}", dirFileIdPath, e1);
} 


{code}
Therefore, when the code catches _*IOException*_ for _*getFileAttr()*_ method, 
it more likely prints a log message with _*INFO*_ level, a lower level, a 
higher level may be scary the users in future.

  was:
There are *inconsistent* log level practices in 
_*hadoop-2.8.5-src/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/**RpcProgramNfs3.java*_.
 
{code:java}
//following log levels are inconsistent with other practices which seems to 
more appropriate
//from line 1814 to 1819 & line 1831 to 1836 in Hadoop-2.8.5 version
try { 
    attr = writeManager.getFileAttr(dfsClient, childHandle, iug); 
} catch (IOException e) { 
    LOG.error("Can't get file attributes for fileId: {}", fileId, e); continue; 
}

//other same practices in this file
//from line 907 to 911 & line 2102 to 2106 
try {
    postOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
} catch (IOException e1) {
    LOG.info("Can't get postOpAttr for fileId: {}", e1);
}

//other similar practices
//from line 1224 to 1227 & line 1139 to 1143 &line 1309 to 1313
try {
    postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
} catch (IOException e1) {
    LOG.info("Can't get postOpDirAttr for {}", dirFileIdPath, e1);
} 


{code}
Therefore, when the code catches _*IOException*_ for _*getFileAttr()*_ method, 
it more likely prints a log message with _*INFO*_ level, a lower level, a 
higher level may be scary the users in future.

        Summary: Inconsistent log level practices in RpcProgramNfs3.java  (was: 
Inconsistent log level practices)

> Inconsistent log level practices in RpcProgramNfs3.java
> -------------------------------------------------------
>
>                 Key: HDFS-14339
>                 URL: https://issues.apache.org/jira/browse/HDFS-14339
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: nfs
>    Affects Versions: 3.1.0, 2.8.5
>            Reporter: Anuhan Torgonshar
>            Priority: Major
>         Attachments: RpcProgramNfs3.java
>
>
> There are *inconsistent* log level practices in 
> _*hadoop-2.8.5-src/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/**RpcProgramNfs3.java*_.
>  
> {code:java}
> //following log levels are inconsistent with other practices which seems to 
> more appropriate
> //from line 1814 to 1819 & line 1831 to 1836 in Hadoop-2.8.5 version
> try { 
>     attr = writeManager.getFileAttr(dfsClient, childHandle, iug); 
> } catch (IOException e) { 
>     LOG.error("Can't get file attributes for fileId: {}", fileId, e); 
> continue; 
> }
> //other 2 same practices in this file
> //from line 907 to 911 & line 2102 to 2106 
> try {
>     postOpAttr = writeManager.getFileAttr(dfsClient, handle, iug);
> } catch (IOException e1) {
>     LOG.info("Can't get postOpAttr for fileId: {}", e1);
> }
> //other 3 similar practices
> //from line 1224 to 1227 & line 1139 to 1143 &line 1309 to 1313
> try {
>     postOpDirAttr = Nfs3Utils.getFileAttr(dfsClient, dirFileIdPath, iug);
> } catch (IOException e1) {
>     LOG.info("Can't get postOpDirAttr for {}", dirFileIdPath, e1);
> } 
> {code}
> Therefore, when the code catches _*IOException*_ for _*getFileAttr()*_ 
> method, it more likely prints a log message with _*INFO*_ level, a lower 
> level, a higher level may be scary the users in future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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