Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14339

Inconsistent log level practices in RpcProgramNfs3.java

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0, 2.8.5
    • 3.3.0
    • nfs
    • Patch, Important

    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

      //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);
      } 
      
      
      

      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.

      Attachments

        1. HDFS-14339.trunk.patch
          1 kB
          Anuhan Torgonshar

        Activity

          People

            OneisAll Anuhan Torgonshar
            OneisAll Anuhan Torgonshar
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: