You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Anuhan Torgonshar (JIRA)" <ji...@apache.org> on 2019/03/06 12:09:00 UTC

[jira] [Created] (HDFS-14339) Inconsistent log level practices

Anuhan Torgonshar created HDFS-14339:
----------------------------------------

             Summary: Inconsistent log level practices
                 Key: HDFS-14339
                 URL: https://issues.apache.org/jira/browse/HDFS-14339
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: nfs
    Affects Versions: 2.8.5, 3.1.0
            Reporter: Anuhan Torgonshar
         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 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.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org