Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 0.21.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      BlockInfo is a static subclass of BlocksMap. It is time to factor it out. We will need this to extend BlockInfo to BlockInfoUnderConstruction so that it could keep track of replica states until all of them are written to data-nodes.

      1. BlockInfo.patch
        27 kB
        Konstantin Shvachko
      2. BlockInfo.patch
        27 kB
        Konstantin Shvachko

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #34 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/34/)
        . Factor out BlockInfo from BlocksMap. Contributed by Konstantin Shvachko.

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #34 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/34/ ) . Factor out BlockInfo from BlocksMap. Contributed by Konstantin Shvachko.
        Hide
        Konstantin Shvachko added a comment -

        I just committed this.

        Show
        Konstantin Shvachko added a comment - I just committed this.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

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

        New patch corrects issues Nicholas noticed.

        Show
        Konstantin Shvachko added a comment - New patch corrects issues Nicholas noticed.
        Hide
        Tsz Wo Nicholas Sze added a comment -
        • There is already a getINode() in BlockInfo. So getInode() is redundant.
        • rename "setInode" to "setINode" and the method does not need to be public.
          +  public void setInode(INodeFile inode) {
          
        • The javadoc for ensureCapacity(..) has an extra *
          +   *      * @return first free triplet index.
          
        Show
        Tsz Wo Nicholas Sze added a comment - There is already a getINode() in BlockInfo. So getInode() is redundant. rename "setInode" to "setINode" and the method does not need to be public. + public void setInode(INodeFile inode) { The javadoc for ensureCapacity(..) has an extra * + * * @ return first free triplet index.
        Hide
        Konstantin Shvachko added a comment -

        All unit tests pass.
        test-patch target is also clean

             [exec] There appear to be 150 release audit warnings before the patch and 150 release audit warnings after applying the patch.
             [exec] +1 overall.  
             [exec]     +1 @author.  The patch does not contain any @author tags.
             [exec]     +1 tests included.  The patch appears to include 3 new or modified tests.
             [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
             [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
             [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
             [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
             [exec] ======================================================================
             [exec] ======================================================================
             [exec]     Finished build.
             [exec] ======================================================================
             [exec] ======================================================================
        BUILD SUCCESSFUL
        Total time: 18 minutes 53 seconds
        
        Show
        Konstantin Shvachko added a comment - All unit tests pass. test-patch target is also clean [exec] There appear to be 150 release audit warnings before the patch and 150 release audit warnings after applying the patch. [exec] +1 overall. [exec] +1 @author. The patch does not contain any @author tags. [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] ====================================================================== [exec] ====================================================================== [exec] Finished build. [exec] ====================================================================== [exec] ====================================================================== BUILD SUCCESSFUL Total time: 18 minutes 53 seconds
        Hide
        Konstantin Shvachko added a comment -

        This patch

        1. factors out BlockInfo;
        2. introduces getInode() and setInode();
        3. removes unused method BlocksMap.addBlock();
        4. merges checkBlockInfo() and addInode();
        5. changes two unnecessary public methods to package private.
        Show
        Konstantin Shvachko added a comment - This patch factors out BlockInfo ; introduces getInode() and setInode() ; removes unused method BlocksMap.addBlock() ; merges checkBlockInfo() and addInode() ; changes two unnecessary public methods to package private.

          People

          • Assignee:
            Konstantin Shvachko
            Reporter:
            Konstantin Shvachko
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development