Author: degenaro Date: Thu May 28 22:48:59 2015 New Revision: 1682351 URL: http://svn.apache.org/r1682351 Log: UIMA-4394 DUCC Orchestrator (OR) reduce publication size comprising command line & especially classpath
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java?rev=1682351&r1=1682350&r2=1682351&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java Thu May 28 22:48:59 2015 @@ -23,6 +23,8 @@ import java.io.ObjectOutputStream; import org.apache.uima.ducc.common.utils.DuccLogger; import org.apache.uima.ducc.common.utils.id.DuccId; +import org.apache.uima.ducc.transport.cmdline.ICommandLine; +import org.apache.uima.ducc.transport.event.common.DuccWorkPopDriver; import org.apache.uima.ducc.transport.event.common.IDuccWork; import org.apache.uima.ducc.transport.event.common.IDuccWorkExecutable; import org.apache.uima.ducc.transport.event.common.IDuccWorkJob; @@ -85,13 +87,20 @@ public class OrchestratorStateDuccEvent String location = "trim"; int bytesTrimmed = 0; for(Object key : workMap.keySet()) { + ICommandLine cmdLine1 = null; + ICommandLine cmdLine2 = null; DuccId duccId = (DuccId) key; IDuccWork dw = (IDuccWork) workMap.get(duccId); if(dw instanceof IDuccWorkJob) { IDuccWorkJob job = (IDuccWorkJob) dw; if(logger != null) { - int s1 = sizeOf(job.getCommandLine()); - int s2 = sizeOf(job.getDriver().getCommandLine()); + cmdLine1 = job.getCommandLine(); + int s1 = sizeOf(cmdLine1); + DuccWorkPopDriver driver = job.getDriver(); + if(driver != null) { + cmdLine2 = driver.getCommandLine(); + } + int s2 = sizeOf(cmdLine2); bytesTrimmed = bytesTrimmed+(s1+s2); String message = "jd:"+s1+" jp:"+s2+" total:"+bytesTrimmed; logger.trace(location, duccId, message); @@ -103,7 +112,8 @@ public class OrchestratorStateDuccEvent IDuccWorkJob service = (IDuccWorkJob) dw; if(logger != null) { int s1 = 0; - int s2 = sizeOf(service.getCommandLine()); + cmdLine2 = service.getCommandLine(); + int s2 = sizeOf(cmdLine2); bytesTrimmed = bytesTrimmed+(s1+s2); String message = "sp:"+s2+" total:"+bytesTrimmed; logger.trace(location, duccId, message); @@ -113,7 +123,8 @@ public class OrchestratorStateDuccEvent else if(dw instanceof IDuccWorkExecutable) { IDuccWorkExecutable dwe = (IDuccWorkExecutable) dw; if(logger != null) { - int s1 = sizeOf(dwe.getCommandLine()); + cmdLine1 = dwe.getCommandLine(); + int s1 = sizeOf(cmdLine1); int s2 = 0; bytesTrimmed = bytesTrimmed+(s1+s2); String message = "mr:"+s1+" total:"+bytesTrimmed;