hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bikas Saha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-4275) Plugable process tree
Date Tue, 31 Jul 2012 07:08:35 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-4275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425571#comment-13425571
] 

Bikas Saha commented on MAPREDUCE-4275:
---------------------------------------

1) This code is mainly used to control the monitoring thread. The monitoring thread relies
on availability of ResourceCalculatorProcessTree and not on resourceCalculatorPlugin. Hence,
I would tend to replace ProcfsBasedProcessTree.isAvailable() with ResourceCalculatorProcessTree.isAvailable().
That is the approach taken in MAPREDUCE-4204.
ResourceCalculatorPlugin is more of a system resource calculator for the machine resources.
Getting ResourceCalculatorProcessTree impl from ResourceCalculatorPlugin formally connects
them in the object model. Also, it does not sound like a standard pattern to have Class B
become the factory of Class A.
{code}
   private boolean isEnabled() {
-    if (!ProcfsBasedProcessTree.isAvailable()) {
-      LOG.info("ProcessTree implementation is missing on this system. "
-          + this.getClass().getName() + " is disabled.");
-      return false;
+    if (resourceCalculatorPlugin == null) {
+            LOG.info("ResourceCalculatorPlugin is unavaiable on this system. "
+                + this.getClass().getName() + " is disabled.");
+            return false;
     }
{code}

2. There are a bunch of diff's like the following that are adding noise to the patch and making
it larger than it should be. Mind checking and cleaning up?
{code}
   /**
    * Checks if the ProcfsBasedProcessTree is available on this system.
-   * 
+   *
    * @return true if ProcfsBasedProcessTree is available. False otherwise.
    */
{code}
                
> Plugable process tree
> ---------------------
>
>                 Key: MAPREDUCE-4275
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4275
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: nodemanager
>    Affects Versions: 3.0.0
>         Environment: FreeBSD 64 bit
>            Reporter: Radim Kolar
>         Attachments: plugable-pstree-1.txt, plugable-pstree-2.txt, plugable-pstree.txt
>
>
> Trunk version of Pluggable process tree. Work based on MAPREDUCE-4204

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message