Details

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

      Description

      The data structure required in BlocksMap is a GettableSet. See also this comment.

      1. h1119_20100525.patch
        10 kB
        Tsz Wo Nicholas Sze
      2. h1119_20100525_y0.20.1xx.patch
        10 kB
        Tsz Wo Nicholas Sze
      3. h1119_20100521.patch
        10 kB
        Tsz Wo Nicholas Sze
      4. h1119_20100506.patch
        10 kB
        Tsz Wo Nicholas Sze
      5. h1119_20100429.patch
        9 kB
        Tsz Wo Nicholas Sze

        Activity

        Hide
        Konstantin Shvachko added a comment -

        +1 the patch for 0.20 looks good.
        Should we apply this to the official 0.20 branch? It is an optimization, not a new feature.

        Show
        Konstantin Shvachko added a comment - +1 the patch for 0.20 looks good. Should we apply this to the official 0.20 branch? It is an optimization, not a new feature.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        h1119_20100525_y0.20.1xx.patch: for y0.20.1xx

        Show
        Tsz Wo Nicholas Sze added a comment - h1119_20100525_y0.20.1xx.patch: for y0.20.1xx
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #284 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/284/)
        HDFS-1119. Introduce a GSet interface to BlocksMap.

        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #284 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk-Commit/284/ ) HDFS-1119 . Introduce a GSet interface to BlocksMap.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this.

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

        +1
        Separate generic parameters for the key and the value makes sense.
        As for the commentary my (older version) Eclipse doesn't show the origin of an overridden method. This was a cosmetic suggestion.

        Show
        Konstantin Shvachko added a comment - +1 Separate generic parameters for the key and the value makes sense. As for the commentary my (older version) Eclipse doesn't show the origin of an overridden method. This was a cosmetic suggestion.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Since this is a code refactoring, no new tests are added. The failed contrib tests are not related to this.

        Show
        Tsz Wo Nicholas Sze added a comment - Since this is a code refactoring, no new tests are added. The failed contrib tests are not related to this.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12445495/h1119_20100525.patch
        against trunk revision 947838.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        -1 contrib tests. The patch failed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12445495/h1119_20100525.patch against trunk revision 947838. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hdfs-Patch-h5.grid.sp2.yahoo.net/376/console This message is automatically generated.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        Thanks Konstantin for the comments.

        h1119_20100525.patch:

        • Renamed GettableSet* to GSet*.
        • Changed GSet<E> to GSet<K, E>.

        > On the patch itself, it would be good to put a comment after @Override indicating which class it actually overrides. Simplifies life.

        I did not make this change since it is very easy to see the class it overrides by Eclipse or some other IDEs.

        Show
        Tsz Wo Nicholas Sze added a comment - Thanks Konstantin for the comments. h1119_20100525.patch: Renamed GettableSet* to GSet*. Changed GSet<E> to GSet<K, E>. > On the patch itself, it would be good to put a comment after @Override indicating which class it actually overrides. Simplifies life. I did not make this change since it is very easy to see the class it overrides by Eclipse or some other IDEs.
        Hide
        Konstantin Shvachko added a comment -

        I see that the get method in the new GettableSet interface is similar to

        V get(Object key)
        

        So I'd propose

        1. to call the parameter key instead of element
        2. to call the interface KeySet
        3. then the HashMap based implementation can be called HashKeySet

        On the patch itself, it would be good to put a comment after @Override indicating which class it actually overrides. Simplifies life.

        @Override // GettableSet
        public int size() {
        ...
        
        Show
        Konstantin Shvachko added a comment - I see that the get method in the new GettableSet interface is similar to V get( Object key) So I'd propose to call the parameter key instead of element to call the interface KeySet then the HashMap based implementation can be called HashKeySet On the patch itself, it would be good to put a comment after @Override indicating which class it actually overrides. Simplifies life. @Override // GettableSet public int size() { ...
        Hide
        Tsz Wo Nicholas Sze added a comment -

        h1119_20100521.patch: check null in GettableSetByHashMap.put(..).

        Show
        Tsz Wo Nicholas Sze added a comment - h1119_20100521.patch: check null in GettableSetByHashMap.put(..).
        Hide
        Tsz Wo Nicholas Sze added a comment -

        h1119_20100506.patch: added more javadoc and moved GettableSet* to org.apache.hadoop.hdfs.util.

        Show
        Tsz Wo Nicholas Sze added a comment - h1119_20100506.patch: added more javadoc and moved GettableSet* to org.apache.hadoop.hdfs.util.
        Hide
        Tsz Wo Nicholas Sze added a comment -

        h1119_20100429.patch:

        • Added GettableSet interface.
        • Added GettableSetByHashMap, a GettableSet implementation using java.util.HashMap.
        • Used GettableSet in BlocksMap.
        • Also removed unused getLoadFactor() methods.
        Show
        Tsz Wo Nicholas Sze added a comment - h1119_20100429.patch: Added GettableSet interface. Added GettableSetByHashMap, a GettableSet implementation using java.util.HashMap. Used GettableSet in BlocksMap. Also removed unused getLoadFactor() methods.

          People

          • Assignee:
            Tsz Wo Nicholas Sze
            Reporter:
            Tsz Wo Nicholas Sze
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development