hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject [41/50] [abbrv] hadoop git commit: YARN-4732. *ProcessTree classes have too many whitespace issues
Date Mon, 21 Mar 2016 20:14:54 GMT
YARN-4732. *ProcessTree classes have too many whitespace issues


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7fae4c68
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7fae4c68
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7fae4c68

Branch: refs/heads/YARN-3368
Commit: 7fae4c68e6d599d0c01bb2cb2c8d5e52925b3e1e
Parents: cd8b688
Author: Karthik Kambatla <kasha@apache.org>
Authored: Sun Mar 20 10:47:38 2016 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Sun Mar 20 10:47:38 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/mapreduce/util/ProcessTree.java   | 7 ++-----
 .../org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java  | 6 ++----
 .../hadoop/yarn/util/ResourceCalculatorProcessTree.java      | 8 ++++----
 .../org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java | 5 ++---
 .../apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java  | 8 --------
 .../hadoop/yarn/util/TestResourceCalculatorProcessTree.java  | 3 +--
 .../apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java | 3 +--
 7 files changed, 12 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ProcessTree.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ProcessTree.java
index 1e2d16e..6cf053e 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ProcessTree.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/util/ProcessTree.java
@@ -48,8 +48,8 @@ public class ProcessTree {
   private static final String SIGTERM_STR = "SIGTERM";
   private static final String SIGKILL_STR = "SIGKILL";
 
-
   public static final boolean isSetsidAvailable = isSetsidSupported();
+
   private static boolean isSetsidSupported() {
     ShellCommandExecutor shexec = null;
     boolean setsidSupported = true;
@@ -114,7 +114,6 @@ public class ProcessTree {
     sigKill(pgrpId, true, sleeptimeBeforeSigkill, inBackground);
   }
 
-
   /**
    * Send a specified signal to the specified pid
    *
@@ -214,7 +213,6 @@ public class ProcessTree {
       }
     }  
   }
-  
 
   /** Kills the process(OR process group) by sending the signal SIGKILL
    * @param pid Process id(OR process group id) of to-be-deleted-process
@@ -301,7 +299,7 @@ public class ProcessTree {
     }
     return (shexec.getExitCode() == 0 ? true : false);
   }
-  
+
   /**
    * Is the process group with  still alive?
    * 
@@ -326,7 +324,6 @@ public class ProcessTree {
     }
     return (shexec.getExitCode() == 0 ? true : false);
   }
-  
 
   /**
    * Helper thread class that kills process-tree with SIGKILL in background

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java
index c0c9356..7bd5390 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ProcfsBasedProcessTree.java
@@ -331,7 +331,7 @@ public class ProcfsBasedProcessTree extends ResourceCalculatorProcessTree
{
     }
     return total;
   }
-  
+
   @Override
   @SuppressWarnings("deprecation")
   public long getCumulativeVmem(int olderThanAge) {
@@ -358,7 +358,7 @@ public class ProcfsBasedProcessTree extends ResourceCalculatorProcessTree
{
     }
     return isAvailable ? totalPages * PAGE_SIZE : UNAVAILABLE; // convert # pages to byte
   }
-  
+
   @Override
   @SuppressWarnings("deprecation")
   public long getCumulativeRssmem(int olderThanAge) {
@@ -409,13 +409,11 @@ public class ProcfsBasedProcessTree extends ResourceCalculatorProcessTree
{
               }
             }
           }
-        
           if (LOG.isDebugEnabled()) {
             LOG.debug(procMemInfo.toString());
           }
         }
       }
-      
     }
     if (total > 0) {
       total *= KB_TO_BYTES; // convert to bytes

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ResourceCalculatorProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ResourceCalculatorProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ResourceCalculatorProcessTree.java
index 01d79d9..7214c75 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ResourceCalculatorProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/ResourceCalculatorProcessTree.java
@@ -78,7 +78,7 @@ public abstract class ResourceCalculatorProcessTree extends Configured {
   public long getVirtualMemorySize() {
     return getVirtualMemorySize(0);
   }
-  
+
   /**
    * Get the virtual memory used by all the processes in the
    * process-tree.
@@ -101,7 +101,7 @@ public abstract class ResourceCalculatorProcessTree extends Configured
{
   public long getRssMemorySize() {
     return getRssMemorySize(0);
   }
-  
+
   /**
    * Get the resident set size (rss) memory used by all the processes
    * in the process-tree.
@@ -127,7 +127,7 @@ public abstract class ResourceCalculatorProcessTree extends Configured
{
   public long getVirtualMemorySize(int olderThanAge) {
     return UNAVAILABLE;
   }
-  
+
   /**
    * Get the virtual memory used by all the processes in the
    * process-tree that are older than the passed in age.
@@ -156,7 +156,7 @@ public abstract class ResourceCalculatorProcessTree extends Configured
{
   public long getRssMemorySize(int olderThanAge) {
     return UNAVAILABLE;
   }
-  
+
   /**
    * Get the resident set size (rss) memory used by all the processes
    * in the process-tree that are older than the passed in age.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java
index 7d5e7f9..7858292 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/util/WindowsBasedProcessTree.java
@@ -45,7 +45,6 @@ public class WindowsBasedProcessTree extends ResourceCalculatorProcessTree
{
     long cpuTimeMsDelta; // delta of cpuTime since last update
     int age = 1;
   }
-  
   private String taskProcessId = null;
   private long cpuTimeMs = UNAVAILABLE;
   private Map<String, ProcessInfo> processTree =
@@ -144,7 +143,7 @@ public class WindowsBasedProcessTree extends ResourceCalculatorProcessTree
{
     }
     return allProcs;
   }
-  
+
   @Override
   public void updateProcessTree() {
     if(taskProcessId != null) {
@@ -214,7 +213,7 @@ public class WindowsBasedProcessTree extends ResourceCalculatorProcessTree
{
     }
     return total;
   }
-  
+
   @Override
   @SuppressWarnings("deprecation")
   public long getCumulativeVmem(int olderThanAge) {

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java
index 4a7e6ff..da7849d4 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java
@@ -227,7 +227,6 @@ public class TestProcfsBasedProcessTree {
     // ProcessTree is gone now. Any further calls should be sane.
     p.updateProcessTree();
     Assert.assertFalse("ProcessTree must have been gone", isAlive(pid));
-    
     Assert.assertTrue(
       "vmem for the gone-process is " + p.getVirtualMemorySize()
           + " . It should be zero.", p.getVirtualMemorySize() == 0);
@@ -581,7 +580,6 @@ public class TestProcfsBasedProcessTree {
       // verify virtual memory
       Assert.assertEquals("Virtual memory does not match", 700000L,
         processTree.getVirtualMemorySize());
-      
       Assert.assertEquals("Virtual memory (old API) does not match", 700000L,
         processTree.getCumulativeVmem());
 
@@ -602,10 +600,8 @@ public class TestProcfsBasedProcessTree {
       processTree.updateProcessTree();
       Assert.assertEquals("vmem does not include new process",
         1200000L, processTree.getVirtualMemorySize());
-      
       Assert.assertEquals("vmem (old API) does not include new process",
         1200000L, processTree.getCumulativeVmem());
-      
       if (!smapEnabled) {
         long cumuRssMem =
             ProcfsBasedProcessTree.PAGE_SIZE > 0
@@ -632,7 +628,6 @@ public class TestProcfsBasedProcessTree {
       Assert.assertEquals(
           "vmem (old API) shouldn't have included new process", 700000L,
           processTree.getCumulativeVmem(1));
-      
       if (!smapEnabled) {
         long cumuRssMem =
             ProcfsBasedProcessTree.PAGE_SIZE > 0
@@ -645,7 +640,6 @@ public class TestProcfsBasedProcessTree {
         Assert.assertEquals(
           "rssmem (old API) shouldn't have included new process", cumuRssMem,
           processTree.getCumulativeRssmem(1));
-        
       } else {
         Assert.assertEquals(
           "rssmem shouldn't have included new process",
@@ -676,12 +670,10 @@ public class TestProcfsBasedProcessTree {
       Assert.assertEquals(
         "vmem shouldn't have included new processes", 700000L,
         processTree.getVirtualMemorySize(2));
-      
       // verify old API
       Assert.assertEquals(
         "vmem (old API) shouldn't have included new processes", 700000L,
         processTree.getCumulativeVmem(2));
-      
       if (!smapEnabled) {
         long cumuRssMem =
             ProcfsBasedProcessTree.PAGE_SIZE > 0

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestResourceCalculatorProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestResourceCalculatorProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestResourceCalculatorProcessTree.java
index 7a3e0e7..28cee7f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestResourceCalculatorProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestResourceCalculatorProcessTree.java
@@ -44,7 +44,6 @@ public class TestResourceCalculatorProcessTree {
     public long getRssMemorySize(int age) {
       return 0;
     }
-    
     @SuppressWarnings("deprecation")
     public long getCumulativeRssmem(int age) {
       return 0;
@@ -53,7 +52,7 @@ public class TestResourceCalculatorProcessTree {
     public long getVirtualMemorySize(int age) {
       return 0;
     }
-    
+
     @SuppressWarnings("deprecation")
     public long getCumulativeVmem(int age) {
       return 0;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/7fae4c68/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java
index 290caa6..cbab1ed 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestWindowsBasedProcessTree.java
@@ -29,7 +29,7 @@ import static org.junit.Assert.assertTrue;
 public class TestWindowsBasedProcessTree {
   private static final Log LOG = LogFactory
       .getLog(TestWindowsBasedProcessTree.class);
-  
+
   class WindowsBasedProcessTreeTester extends WindowsBasedProcessTree {
     String infoStr = null;
 
@@ -62,7 +62,6 @@ public class TestWindowsBasedProcessTree {
     assertTrue(pTree.getCumulativeVmem() == 2048);
     assertTrue(pTree.getVirtualMemorySize(0) == 2048);
     assertTrue(pTree.getCumulativeVmem(0) == 2048);
-    
     assertTrue(pTree.getRssMemorySize() == 2048);
     assertTrue(pTree.getCumulativeRssmem() == 2048);
     assertTrue(pTree.getRssMemorySize(0) == 2048);


Mime
View raw message