You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2016/12/14 17:44:46 UTC

svn commit: r1774299 - /uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java

Author: cwiklik
Date: Wed Dec 14 17:44:46 2016
New Revision: 1774299

URL: http://svn.apache.org/viewvc?rev=1774299&view=rev
Log:
UIMA-5047 Fixed missing CPU on RH7. The code running on this platform with new cgroups configuration was not adding "ducc" in the path 

Modified:
    uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java

Modified: uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java
URL: http://svn.apache.org/viewvc/uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java?rev=1774299&r1=1774298&r2=1774299&view=diff
==============================================================================
--- uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java (original)
+++ uima/uima-ducc/trunk/uima-ducc-agent/src/main/java/org/apache/uima/ducc/agent/launcher/CGroupsManager.java Wed Dec 14 17:44:46 2016
@@ -504,6 +504,9 @@ public class CGroupsManager {
 		if ( !location.endsWith(System.getProperty("file.separator"))) {
 			location = location + System.getProperty("file.separator");
 		}
+		if ( !legacyCgConfig ) {
+			location += SYSTEM+System.getProperty("file.separator");
+		}
 		return location+id+"cpuacct.usage";
 	}
 	public boolean isCpuReportingEnabled() {
@@ -519,17 +522,6 @@ public class CGroupsManager {
 		if (!containerId.endsWith(System.getProperty("file.separator"))) {
 			containerId = containerId + System.getProperty("file.separator");
 		}
-		/*
-		if (!containerId.startsWith(System.getProperty("file.separator"))) {
-			containerId = System.getProperty("file.separator")+containerId;
-		}
-		String location = getCGroupLocation("cpuacct").trim();
-		if ( !location.endsWith(System.getProperty("file.separator"))) {
-			location += System.getProperty("file.separator");
-		}
-//		String file = getCGroupLocation("cpuacct")+containerId+System.getProperty("file.separator")+"cpuacct.usage";
-		String file = location+"cpuacct.usage";
-		*/
 		String file = composeCpuAccountingFileName(containerId.trim());
 		agentLogger.info("getCpuUsage", null, "CPUACCT.USAGE file:"+file);
 		File f = new File(file);