HBase
  1. HBase
  2. HBASE-9983

Lower the memory footprint of HRegionLocation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.98.0, 0.96.0
    • Fix Version/s: 0.98.0, 0.96.1
    • Component/s: Client
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      It"s more or less a desperate cause...
      If we have a lot of regions, the size of this class becomes a problem. It's under optimized for this case...

      This patch is just about the trivial part

      1. unbloated.patch
        12 kB
        Nicolas Liochon
      2. 9983.v2.patch
        9 kB
        Nicolas Liochon

        Activity

        Nicolas Liochon created issue -
        Nicolas Liochon made changes -
        Field Original Value New Value
        Attachment unbloated.patch [ 12614244 ]
        Nicolas Liochon made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 hadoop1.0. The patch compiles against the hadoop 1.0 profile.

        +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile.

        -1 javadoc. The javadoc tool appears to have generated 10 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 (version 1.3.9) warnings.

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

        +1 lineLengths. The patch does not introduce lines longer than 100

        -1 site. The patch appears to cause mvn site goal to fail.

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

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//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/12614244/unbloated.patch against trunk revision . +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 3 new or modified tests. +1 hadoop1.0 . The patch compiles against the hadoop 1.0 profile. +1 hadoop2.0 . The patch compiles against the hadoop 2.0 profile. -1 javadoc . The javadoc tool appears to have generated 10 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 (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 lineLengths . The patch does not introduce lines longer than 100 -1 site . The patch appears to cause mvn site goal to fail. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/7899//console This message is automatically generated.
        Hide
        Ted Yu added a comment -
        -      addresses.add(location != null ? location.getHostnamePort() : "null location");
        +      addresses.add(location != null ? location.getServerName().toString() : "null location");
        

        What if two region servers run on the same server ?

        Show
        Ted Yu added a comment - - addresses.add(location != null ? location.getHostnamePort() : " null location" ); + addresses.add(location != null ? location.getServerName().toString() : " null location" ); What if two region servers run on the same server ?
        Hide
        stack added a comment -

        What if two region servers run on the same server ?

        ServerName includes port.

        +1

        Looks like another issue leaked into this one:

        • byte [] b = format;
          + byte [] b = format(rd.nextLong());
        Show
        stack added a comment - What if two region servers run on the same server ? ServerName includes port. +1 Looks like another issue leaked into this one: byte [] b = format ; + byte [] b = format(rd.nextLong());
        Nicolas Liochon made changes -
        Attachment 9983.v2.patch [ 12614279 ]
        Nicolas Liochon made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Release Note v2 is what I committed (rebased, ClentNoCluster removed, commented added).

        Thanks for the review, Stack & Ted.
        Resolution Fixed [ 1 ]
        Nicolas Liochon made changes -
        Release Note v2 is what I committed (rebased, ClentNoCluster removed, commented added).

        Thanks for the review, Stack & Ted.
        Hide
        Nicolas Liochon added a comment -

        v2 is what I committed (rebased, ClentNoCluster removed, commented added).

        Thanks for the review, Stack & Ted.

        Show
        Nicolas Liochon added a comment - v2 is what I committed (rebased, ClentNoCluster removed, commented added). Thanks for the review, Stack & Ted.
        Hide
        Hudson added a comment -

        FAILURE: Integrated in hbase-0.96-hadoop2 #121 (See https://builds.apache.org/job/hbase-0.96-hadoop2/121/)
        HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542696)

        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Show
        Hudson added a comment - FAILURE: Integrated in hbase-0.96-hadoop2 #121 (See https://builds.apache.org/job/hbase-0.96-hadoop2/121/ ) HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542696) /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-TRUNK #4683 (See https://builds.apache.org/job/HBase-TRUNK/4683/)
        HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542694)

        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK #4683 (See https://builds.apache.org/job/HBase-TRUNK/4683/ ) HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542694) /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in hbase-0.96 #192 (See https://builds.apache.org/job/hbase-0.96/192/)
        HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542696)

        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
        • /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in hbase-0.96 #192 (See https://builds.apache.org/job/hbase-0.96/192/ ) HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542696) /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #840 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/840/)
        HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542694)

        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java
        • /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #840 (See https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/840/ ) HBASE-9983 Lower the memory footprint of HRegionLocation (nkeywal: rev 1542694) /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/HRegionLocation.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ScannerCallable.java
        Hide
        Nicolas Liochon added a comment -

        Note that I've closed the issue as I committed the patch, but more work is needed...

        Show
        Nicolas Liochon added a comment - Note that I've closed the issue as I committed the patch, but more work is needed...
        Hide
        Vladimir Rodionov added a comment -

        Its always good to measure the improvement. Any numbers, Nicolas, you can share?

        Show
        Vladimir Rodionov added a comment - Its always good to measure the improvement. Any numbers, Nicolas, you can share?
        Hide
        Nicolas Liochon added a comment -

        I haven't done a measure before/after for this one (would have been interested, I agree).
        Right now, so with this jira included, I'm seeing (with Yourkit) that an entry the location skip list takes ~550 bytes. This will be lowered with HBASE-9976 and HBASE-9988. Then we have one ServerName instance by entry as well...

        Show
        Nicolas Liochon added a comment - I haven't done a measure before/after for this one (would have been interested, I agree). Right now, so with this jira included, I'm seeing (with Yourkit) that an entry the location skip list takes ~550 bytes. This will be lowered with HBASE-9976 and HBASE-9988 . Then we have one ServerName instance by entry as well...
        Hide
        stack added a comment -

        Released in 0.96.1. Issue closed.

        Show
        stack added a comment - Released in 0.96.1. Issue closed.
        stack made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1m 47s 1 Nicolas Liochon 16/Nov/13 20:43
        Patch Available Patch Available Resolved Resolved
        13h 47m 1 Nicolas Liochon 17/Nov/13 10:30
        Resolved Resolved Closed Closed
        29d 8h 16m 1 stack 16/Dec/13 18:46

          People

          • Assignee:
            Nicolas Liochon
            Reporter:
            Nicolas Liochon
          • Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development