Hadoop Common
  1. Hadoop Common
  2. HADOOP-4435

The JobTracker should display the amount of heap memory used

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Changed JobTracker web status page to display the amount of heap memory in use. This changes the JobSubmissionProtocol.

      Description

      It would be nice to make the JobTracker UI display the amount of heap memory currently in use. This is similar to the DFS UI that already displays the amount if heap memory used by the NameNode.

      1. clusterSummary4.patch
        20 kB
        dhruba borthakur
      2. clusterSummary3.patch
        21 kB
        dhruba borthakur
      3. clusterSummary2.patch
        10 kB
        dhruba borthakur
      4. clusterSummary.patch
        4 kB
        dhruba borthakur
      5. clusterSummary.patch
        5 kB
        dhruba borthakur

        Activity

        dhruba borthakur created issue -
        dhruba borthakur made changes -
        Field Original Value New Value
        Assignee dhruba borthakur [ dhruba ]
        Hide
        dhruba borthakur added a comment -

        I propose to add the following two methods to ClusterSummary:

          /**
           * Get the total heap memory used by the <code>JobTracker</code>
           * 
           * @return the size of heap memory used by the <code>JobTracker</code>
           */
          public long getUsedMemory() {
            return used_memory;
          }
        
          /**
           * Get the maximum configured heap memory that can be used by the <code>JobTracker</code>
           * 
           * @return the configured size of max heap memory that can be used by the <code>JobTracker</code>
           */
          public long getMaxMemory() {
            return max_memory;
          }
        
        
        
        Show
        dhruba borthakur added a comment - I propose to add the following two methods to ClusterSummary: /** * Get the total heap memory used by the <code>JobTracker</code> * * @ return the size of heap memory used by the <code>JobTracker</code> */ public long getUsedMemory() { return used_memory; } /** * Get the maximum configured heap memory that can be used by the <code>JobTracker</code> * * @ return the configured size of max heap memory that can be used by the <code>JobTracker</code> */ public long getMaxMemory() { return max_memory; }
        dhruba borthakur made changes -
        Attachment clusterSummary.patch [ 12392309 ]
        dhruba borthakur made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Owen O'Malley added a comment -

        There is no way this is a blocker bug. It is a minor improvement.

        Show
        Owen O'Malley added a comment - There is no way this is a blocker bug. It is a minor improvement.
        Owen O'Malley made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Fix Version/s 0.19.0 [ 12313211 ]
        Fix Version/s 0.20.0 [ 12313438 ]
        Hide
        Owen O'Malley added a comment -

        You need to change the client protocol version.

        Show
        Owen O'Malley added a comment - You need to change the client protocol version.
        Owen O'Malley made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        dhruba borthakur added a comment -

        The reason I was marking this as a blocker is because it exposes a new public API that allows an external process to monitor the memory consumption on the JT. Hive monitors this resource usage on the JT and throttles new jobs from getting into the cluster. This patch enables a very powerful functionality in Hive. That's the reason why I would like to get this into 0.19. I will submit a patch that changes the ClientProtocol.

        Show
        dhruba borthakur added a comment - The reason I was marking this as a blocker is because it exposes a new public API that allows an external process to monitor the memory consumption on the JT. Hive monitors this resource usage on the JT and throttles new jobs from getting into the cluster. This patch enables a very powerful functionality in Hive. That's the reason why I would like to get this into 0.19. I will submit a patch that changes the ClientProtocol.
        Hide
        Owen O'Malley added a comment -

        It is still not a blocker. It is a feature you wish had made the 0.19 release.

        Show
        Owen O'Malley added a comment - It is still not a blocker. It is a feature you wish had made the 0.19 release.
        Hide
        dhruba borthakur added a comment -

        > It is still not a blocker. It is a feature you wish had made the 0.19 release.

        Sigh. You are right.

        Show
        dhruba borthakur added a comment - > It is still not a blocker. It is a feature you wish had made the 0.19 release. Sigh. You are right.
        dhruba borthakur made changes -
        Attachment clusterSummary.patch [ 12392375 ]
        Hide
        Amar Kamat added a comment -

        2 comments :
        1) What if we display heap-details as part of cluster-summary. Something like

        State:
        Started:
        Version:
        Heap Information:
        

        Can we show it as a percentage bar? Now generateSummaryTable() remains same and its a one line change in jobtracker.jsp
        2) Will it be a big change to pull out FsShell.byteDesc() into util?

        Show
        Amar Kamat added a comment - 2 comments : 1) What if we display heap-details as part of cluster-summary . Something like State: Started: Version: Heap Information: Can we show it as a percentage bar? Now generateSummaryTable() remains same and its a one line change in jobtracker.jsp 2) Will it be a big change to pull out FsShell.byteDesc() into util ?
        Hide
        dhruba borthakur added a comment -

        1. I would like the JT and NN to display the Heap usage at relatively the same location. The NN displays the Heap size in the Cluster Summary area. Also, the values in the Cluster Summary Area keep changing on a live cluster whereas the header portion (that comprises Started:, Compiledby:, etc) are constant for the life of a JT. For these reasons, i would like to keep the display of the Heap Usage in the Cluster Summary portion.

        2. I moved FsShell.bytedesc into utils.StringUtils as per your suggestion.

        Show
        dhruba borthakur added a comment - 1. I would like the JT and NN to display the Heap usage at relatively the same location. The NN displays the Heap size in the Cluster Summary area. Also, the values in the Cluster Summary Area keep changing on a live cluster whereas the header portion (that comprises Started:, Compiledby:, etc) are constant for the life of a JT. For these reasons, i would like to keep the display of the Heap Usage in the Cluster Summary portion. 2. I moved FsShell.bytedesc into utils.StringUtils as per your suggestion.
        dhruba borthakur made changes -
        Attachment clusterSummary2.patch [ 12392899 ]
        dhruba borthakur made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Amar Kamat added a comment -

        What if we display heap-details as part of cluster-summary.

        What I mean was to have heap-info as a part of (i.e inside) the cluster summary table and not at the header but I wrongly showed it as a part of the JT info. Sorry for the confusion. So +1.

        Few comments on the patch
        1) I think changes to DatanodeDescriptor.java are unnecessary.
        2) Deprecate FsShell.byteDesc() and FsShell.limitDecimalTo2(). Point StringUtil.byteDesc()/StringUtil.limitDecimalTo2() in the comment.
        3) Change the code that use FsShell.byteDesc()/FsShell.limitDecimalTo2 to use StringUtils.byteDesc()/StringUtil.limitDecimalTo2().
        4) Do we need to show the heap info through cli?

        Show
        Amar Kamat added a comment - What if we display heap-details as part of cluster-summary. What I mean was to have heap-info as a part of (i.e inside) the cluster summary table and not at the header but I wrongly showed it as a part of the JT info. Sorry for the confusion. So +1. Few comments on the patch 1) I think changes to DatanodeDescriptor.java are unnecessary. 2) Deprecate FsShell.byteDesc() and FsShell.limitDecimalTo2() . Point StringUtil.byteDesc()/StringUtil.limitDecimalTo2() in the comment. 3) Change the code that use FsShell.byteDesc()/FsShell.limitDecimalTo2 to use StringUtils.byteDesc()/StringUtil.limitDecimalTo2() . 4) Do we need to show the heap info through cli?
        Hide
        dhruba borthakur added a comment -

        Incorporated Amar's review comments. At present, I do not plan to add this to a command line utility.

        Show
        dhruba borthakur added a comment - Incorporated Amar's review comments. At present, I do not plan to add this to a command line utility.
        dhruba borthakur made changes -
        Attachment clusterSummary3.patch [ 12393205 ]
        dhruba borthakur made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Hide
        dhruba borthakur added a comment -

        Incorporated Amar's review comments.

        Show
        dhruba borthakur added a comment - Incorporated Amar's review comments.
        dhruba borthakur 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/12393205/clusterSummary3.patch
        against trunk revision 709609.

        +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 tests are needed for 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 Eclipse classpath. The patch retains Eclipse classpath integrity.

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/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/12393205/clusterSummary3.patch against trunk revision 709609. +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 tests are needed for 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 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3518/console This message is automatically generated.
        Hide
        Amar Kamat added a comment -

        Dhruba, you forgot to remove the System.out.println() statements in JobQueueTaskScheduler.java.

        Show
        Amar Kamat added a comment - Dhruba, you forgot to remove the System.out.println() statements in JobQueueTaskScheduler.java .
        Hide
        dhruba borthakur added a comment -

        Hi Amar, thanks for looking over this one. Removed changes to JobQuueTaskScheduler.

        Show
        dhruba borthakur added a comment - Hi Amar, thanks for looking over this one. Removed changes to JobQuueTaskScheduler.
        dhruba borthakur made changes -
        Attachment clusterSummary4.patch [ 12393281 ]
        Hide
        dhruba borthakur added a comment -

        Hi Amar, do you want to review this one again? Thanks.

        Show
        dhruba borthakur added a comment - Hi Amar, do you want to review this one again? Thanks.
        Hide
        Amar Kamat added a comment -

        +1. Wondering if showing a percentage bar (graphical) along with the numerical info makes sense. Just a thought.

        Show
        Amar Kamat added a comment - +1. Wondering if showing a percentage bar (graphical) along with the numerical info makes sense. Just a thought.
        Hide
        dhruba borthakur added a comment -

        Hi Amar,it is possible that a progress bar might be useful. But I would like to commit this patch as it stands and, if the need arises, do the progress bar as part of a separate JIRA.

        Show
        dhruba borthakur added a comment - Hi Amar,it is possible that a progress bar might be useful. But I would like to commit this patch as it stands and, if the need arises, do the progress bar as part of a separate JIRA.
        Hide
        Amar Kamat added a comment -

        +1

        Show
        Amar Kamat added a comment - +1
        Hide
        dhruba borthakur added a comment -

        I just committed this.

        Show
        dhruba borthakur added a comment - I just committed this.
        dhruba borthakur made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Release Note The JobTracker WebUI displays the amount of heap memory in use. This changes the JobSubmissionProtocol.
        Resolution Fixed [ 1 ]
        Hadoop Flags [Incompatible change, Reviewed]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk #659 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/659/)
        . The JobTracker WebUI displays the amount of heap memory
        in use. (dhruba)

        Show
        Hudson added a comment - Integrated in Hadoop-trunk #659 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/659/ ) . The JobTracker WebUI displays the amount of heap memory in use. (dhruba)
        Hide
        Robert Chansler added a comment -

        Edit release note for publication.

        Show
        Robert Chansler added a comment - Edit release note for publication.
        Robert Chansler made changes -
        Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
        Release Note The JobTracker WebUI displays the amount of heap memory in use. This changes the JobSubmissionProtocol.
        Changed JobTracker web status page to display the amount of heap memory in use. This changes the JobSubmissionProtocol.
        Robert Chansler made changes -
        Hadoop Flags [Reviewed, Incompatible change] [Incompatible change, Reviewed]
        Release Note Changed JobTracker web status page to display the amount of heap memory in use. This changes the JobSubmissionProtocol.
        Changed JobTracker web status page to display the amount of heap memory in use. This changes the JobSubmissionProtocol.
        Nigel Daley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Owen O'Malley made changes -
        Component/s mapred [ 12310690 ]

          People

          • Assignee:
            dhruba borthakur
            Reporter:
            dhruba borthakur
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development