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

Log refactoring: method invocation should be replaced by a shorter method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.2
    • None
    • None
    • None

    Description

      Similar to the fix for AVRO-115. In file:

      hadoop-rel-release-2.7.2/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtxCache.java

      in line 72, the logging code:

      LOG.trace("openFileMap size:" + openFileMap.size());
      

      In the same class, there is a method in line 189:

        int size() {
          return openFileMap.size();
        }
      

      We can tell that openFileMap.size() could be replaced by method size() for the case of readability and simplicity

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chenfsd Nemo Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: