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

NamenodeFsck.toString() uses StringBuilder with + operator

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      We should always use StringBuilder.append(..) but not + (string concatenation).

      1. HDFS-2238.patch
        6 kB
        Uma Maheswara Rao G

        Activity

        Hide
        umamaheswararao Uma Maheswara Rao G added a comment -

        Verified all the fsck related tests, All are passing. No impact because of this change.

        output format:

        Status: CORRUPT
        Total size: 62523 B
        Total dirs: 17
        Total files: 20
        Total blocks (validated): 20 (avg. block size 3126 B)
        ********************************
        CORRUPT FILES: 20
        MISSING BLOCKS: 20
        MISSING SIZE: 62523 B
        CORRUPT BLOCKS: 20
        ********************************
        Minimally replicated blocks: 0 (0.0 %)
        Over-replicated blocks: 0 (0.0 %)
        Under-replicated blocks: 0 (0.0 %)
        Mis-replicated blocks: 0 (0.0 %)
        Default replication factor: 0
        Average block replication: 0.0
        Corrupt blocks: 20
        Missing replicas: 0

        No separate tests provided for this change.

        Show
        umamaheswararao Uma Maheswara Rao G added a comment - Verified all the fsck related tests, All are passing. No impact because of this change. output format: Status: CORRUPT Total size: 62523 B Total dirs: 17 Total files: 20 Total blocks (validated): 20 (avg. block size 3126 B) ******************************** CORRUPT FILES: 20 MISSING BLOCKS: 20 MISSING SIZE: 62523 B CORRUPT BLOCKS: 20 ******************************** Minimally replicated blocks: 0 (0.0 %) Over-replicated blocks: 0 (0.0 %) Under-replicated blocks: 0 (0.0 %) Mis-replicated blocks: 0 (0.0 %) Default replication factor: 0 Average block replication: 0.0 Corrupt blocks: 20 Missing replicas: 0 No separate tests provided for this change.
        Hide
        umamaheswararao Uma Maheswara Rao G added a comment -

        [exec] +1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] -1 tests included. The patch doesn't appear to include any new or modified tests.
        [exec] Please justify why no new tests are needed for this patch.
        [exec] Also please list what manual steps were performed to verify this patch.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
        [exec]
        [exec] +1 system test framework. The patch passed system test framework compile.

        No tests required for this change.
        FSCK Report formation result pasted in above comment.

        Show
        umamaheswararao Uma Maheswara Rao G added a comment - [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] -1 tests included. The patch doesn't appear to include any new or modified tests. [exec] Please justify why no new tests are needed for this patch. [exec] Also please list what manual steps were performed to verify this patch. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] +1 system test framework. The patch passed system test framework compile. No tests required for this change. FSCK Report formation result pasted in above comment.
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
        Hide
        szetszwo Tsz Wo Nicholas Sze added a comment -

        I am committed this. Thanks, Uma!

        Show
        szetszwo Tsz Wo Nicholas Sze added a comment - I am committed this. Thanks, Uma!
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #711 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/711/)
        HDFS-2238. In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G

        szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973
        Files :

        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #711 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/711/ ) HDFS-2238 . In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973 Files : /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #817 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/817/)
        HDFS-2238. In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G

        szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973
        Files :

        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #817 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/817/ ) HDFS-2238 . In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973 Files : /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
        Hide
        hudson Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #744 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/744/)
        HDFS-2238. In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G

        szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973
        Files :

        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java
        Show
        hudson Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #744 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/744/ ) HDFS-2238 . In NamenodeFsck.toString(), uses StringBuilder.(..) instead of string concatenation. Contributed by Uma Maheswara Rao G szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154973 Files : /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java

          People

          • Assignee:
            umamaheswararao Uma Maheswara Rao G
            Reporter:
            szetszwo Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development