Issue Details (XML | Word | Printable)

Key: HADOOP-4435
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: dhruba borthakur
Reporter: dhruba borthakur
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

The JobTracker should display the amount of heap memory used

Created: 16/Oct/08 10:19 PM   Updated: 08/Jul/09 04:53 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.20.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works clusterSummary.patch 2008-10-17 07:25 PM dhruba borthakur 5 kB
Text File Licensed for inclusion in ASF works clusterSummary.patch 2008-10-16 10:33 PM dhruba borthakur 4 kB
Text File Licensed for inclusion in ASF works clusterSummary2.patch 2008-10-27 10:33 PM dhruba borthakur 10 kB
Text File Licensed for inclusion in ASF works clusterSummary3.patch 2008-11-02 07:56 AM dhruba borthakur 21 kB
Text File Licensed for inclusion in ASF works clusterSummary4.patch 2008-11-04 06:19 AM dhruba borthakur 20 kB

Hadoop Flags: Reviewed, Incompatible change
Release Note: Changed JobTracker web status page to display the amount of heap memory in use. This changes the JobSubmissionProtocol.
Resolution Date: 11/Nov/08 06:50 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
dhruba borthakur added a comment - 16/Oct/08 10:24 PM
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;
  }

Owen O'Malley added a comment - 17/Oct/08 05:39 PM
There is no way this is a blocker bug. It is a minor improvement.

Owen O'Malley added a comment - 17/Oct/08 05:42 PM
You need to change the client protocol version.

dhruba borthakur added a comment - 17/Oct/08 06:15 PM
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.

Owen O'Malley added a comment - 17/Oct/08 06:28 PM
It is still not a blocker. It is a feature you wish had made the 0.19 release.

dhruba borthakur added a comment - 17/Oct/08 07:25 PM
> It is still not a blocker. It is a feature you wish had made the 0.19 release.

Sigh. You are right.


Amar Kamat added a comment - 23/Oct/08 11:38 AM
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?


dhruba borthakur added a comment - 27/Oct/08 10:33 PM
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.


Amar Kamat added a comment - 28/Oct/08 05:04 AM

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?


dhruba borthakur added a comment - 02/Nov/08 07:56 AM
Incorporated Amar's review comments. At present, I do not plan to add this to a command line utility.

dhruba borthakur added a comment - 02/Nov/08 07:57 AM
Incorporated Amar's review comments.

Hadoop QA added a comment - 03/Nov/08 08:14 PM
-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.


Amar Kamat added a comment - 04/Nov/08 05:33 AM
Dhruba, you forgot to remove the System.out.println() statements in JobQueueTaskScheduler.java.

dhruba borthakur added a comment - 04/Nov/08 06:19 AM
Hi Amar, thanks for looking over this one. Removed changes to JobQuueTaskScheduler.

dhruba borthakur added a comment - 11/Nov/08 06:31 AM
Hi Amar, do you want to review this one again? Thanks.

Amar Kamat added a comment - 11/Nov/08 08:09 AM
+1. Wondering if showing a percentage bar (graphical) along with the numerical info makes sense. Just a thought.

dhruba borthakur added a comment - 11/Nov/08 09:59 AM
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.

Amar Kamat added a comment - 11/Nov/08 10:05 AM
+1

dhruba borthakur added a comment - 11/Nov/08 06:50 PM
I just committed this.

Hudson added a comment - 13/Nov/08 02:11 AM
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)

Robert Chansler added a comment - 03/Mar/09 06:17 PM
Edit release note for publication.