hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r1445882 - in /hadoop/common/trunk/hadoop-yarn-project: ./ hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/
Date Wed, 13 Feb 2013 19:40:36 GMT
Author: sseth
Date: Wed Feb 13 19:40:36 2013
New Revision: 1445882

URL: http://svn.apache.org/r1445882
Log:
YARN-391. Formatting fixes for LCEResourceHandler classes. Contributed by Steve Loughran)

Modified:
    hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/CgroupsLCEResourcesHandler.java
    hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/DefaultLCEResourcesHandler.java

Modified: hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt?rev=1445882&r1=1445881&r2=1445882&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-yarn-project/CHANGES.txt Wed Feb 13 19:40:36 2013
@@ -35,6 +35,9 @@ Release 2.0.4-beta - UNRELEASED
     YARN-377. Use the new StringUtils methods added by HADOOP-9252 and fix
     TestContainersMonitor.  (Chris Nauroth via szetszwo)
 
+    YARN-391. Formatting fixes for LCEResourceHandler classes.
+    (Steve Loughran via sseth)
+
 Release 2.0.3-alpha - 2013-02-06 
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/CgroupsLCEResourcesHandler.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/CgroupsLCEResourcesHandler.java?rev=1445882&r1=1445881&r2=1445882&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/CgroupsLCEResourcesHandler.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/CgroupsLCEResourcesHandler.java
Wed Feb 13 19:40:36 2013
@@ -80,17 +80,17 @@ public class CgroupsLCEResourcesHandler 
             NM_LINUX_CONTAINER_CGROUPS_MOUNT, false);
     this.cgroupMountPath = conf.get(YarnConfiguration.
             NM_LINUX_CONTAINER_CGROUPS_MOUNT_PATH, null);
-	
+
     // remove extra /'s at end or start of cgroupPrefix
     if (cgroupPrefix.charAt(0) == '/') {
-    	cgroupPrefix = cgroupPrefix.substring(1);
+      cgroupPrefix = cgroupPrefix.substring(1);
     }
 
     int len = cgroupPrefix.length();
     if (cgroupPrefix.charAt(len - 1) == '/') {
-    	cgroupPrefix = cgroupPrefix.substring(0, len - 1);
+      cgroupPrefix = cgroupPrefix.substring(0, len - 1);
     }
-   
+  
     // mount cgroups if requested
     if (cgroupMount && cgroupMountPath != null) {
       ArrayList<String> cgroupKVs = new ArrayList<String>();
@@ -98,14 +98,14 @@ public class CgroupsLCEResourcesHandler 
                     CONTROLLER_CPU);
       lce.mountCgroups(cgroupKVs, cgroupPrefix);
     }
-    
+
     initializeControllerPaths();
   }
 
 
   boolean isCpuWeightEnabled() {
     return this.cpuWeightEnabled;
-  }	
+  }
 
   /*
    * Next four functions are for an individual cgroup.
@@ -155,7 +155,7 @@ public class CgroupsLCEResourcesHandler 
         }
       }
     }
-  }	
+  }
 
   private void deleteCgroup(String controller, String groupName) {
     String path = pathForCgroup(controller, groupName);
@@ -165,7 +165,7 @@ public class CgroupsLCEResourcesHandler 
     if (! new File(path).delete()) {
       LOG.warn("Unable to delete cgroup at: " + path);
     }
-  }	
+  }
 
   /*
    * Next three functions operate on all the resources we are enforcing.
@@ -178,7 +178,7 @@ public class CgroupsLCEResourcesHandler 
   private void setupLimits(ContainerId containerId,
                            Resource containerResource) throws IOException {
     String containerName = containerId.toString();
-    
+
     if (isCpuWeightEnabled()) {
       createCgroup(CONTROLLER_CPU, containerName);
       updateCgroup(CONTROLLER_CPU, containerName, "shares",
@@ -202,7 +202,7 @@ public class CgroupsLCEResourcesHandler 
 
     if (isCpuWeightEnabled()) {
       deleteCgroup(CONTROLLER_CPU, containerName);
-    }	
+    }
   }
 
   /*
@@ -222,7 +222,7 @@ public class CgroupsLCEResourcesHandler 
     String containerName = containerId.toString();
 
     StringBuilder sb = new StringBuilder("cgroups=");
-    
+
     if (isCpuWeightEnabled()) {
       sb.append(pathForCgroup(CONTROLLER_CPU, containerName) + "/cgroup.procs");
       sb.append(",");
@@ -231,7 +231,7 @@ public class CgroupsLCEResourcesHandler 
     if (sb.charAt(sb.length() - 1) == ',') {
       sb.deleteCharAt(sb.length() - 1);
     }
-    
+
     return sb.toString();
   }
 
@@ -255,8 +255,8 @@ public class CgroupsLCEResourcesHandler 
     BufferedReader in = null;
 
     try {
-      in = new BufferedReader(new FileReader(new File(MTAB_FILE)));	
-    	
+      in = new BufferedReader(new FileReader(new File(MTAB_FILE)));
+
       for (String str = in.readLine(); str != null;
           str = in.readLine()) {
         Matcher m = MTAB_FILE_FORMAT.matcher(str);
@@ -316,6 +316,6 @@ public class CgroupsLCEResourcesHandler 
     } else {
       throw new IOException("Not able to enforce cpu weights; cannot find "
           + "cgroup for cpu controller in " + MTAB_FILE);
-    }	
+    }
   }
-}
\ No newline at end of file
+}

Modified: hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/DefaultLCEResourcesHandler.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/DefaultLCEResourcesHandler.java?rev=1445882&r1=1445881&r2=1445882&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/DefaultLCEResourcesHandler.java
(original)
+++ hadoop/common/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/util/DefaultLCEResourcesHandler.java
Wed Feb 13 19:40:36 2013
@@ -33,7 +33,7 @@ public class DefaultLCEResourcesHandler 
   private Configuration conf;
   
   public DefaultLCEResourcesHandler() {
-  }	
+  }
   
   public void setConf(Configuration conf) {
         this.conf = conf;
@@ -42,7 +42,7 @@ public class DefaultLCEResourcesHandler 
   @Override
   public Configuration getConf() {
     return  conf;
-  }	
+  }
   
   public void init(LinuxContainerExecutor lce) {
   }



Mime
View raw message