Author: degenaro Date: Thu May 28 14:04:24 2015 New Revision: 1682253 URL: http://svn.apache.org/r1682253 Log: UIMA-4435 DUCC Orchestrator (OR) publication changed from DuccWorkMap to IDuccWorkMap
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManager.java uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManagerComponent.java uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManager.java uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManagerComponent.java uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/IServiceManager.java uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/OrchestratorStateDuccEvent.java uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/DuccWorkMap.java uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/IDuccWorkMap.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccData.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/WebServerComponent.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/ServicesHelper.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServicesHelper.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorJob.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorManagedReservation.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorReservation.java uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManager.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManager.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManager.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManager.java Thu May 28 14:04:24 2015 @@ -18,7 +18,7 @@ */ package org.apache.uima.ducc.pm; -import java.util.concurrent.ConcurrentHashMap; +import java.util.Map; import org.apache.uima.ducc.common.utils.id.DuccId; import org.apache.uima.ducc.transport.event.PmStateDuccEvent; @@ -28,6 +28,6 @@ import org.apache.uima.ducc.transport.ev public interface ProcessManager { public static final String DuccComponent = "ProcessManager"; //public void reconcileJobManagersState(ConcurrentHashMap<DuccId, IDuccWork> jobMap); - public void dispatchStateUpdateToAgents(ConcurrentHashMap<DuccId, IDuccWork> workMap, long sequence); + public void dispatchStateUpdateToAgents(Map<DuccId, IDuccWork> workMap, long sequence); public PmStateDuccEvent getState(); } Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManagerComponent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManagerComponent.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManagerComponent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-pm/src/main/java/org/apache/uima/ducc/pm/ProcessManagerComponent.java Thu May 28 14:04:24 2015 @@ -20,8 +20,8 @@ package org.apache.uima.ducc.pm; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Map.Entry; -import java.util.concurrent.ConcurrentHashMap; import org.apache.camel.CamelContext; import org.apache.uima.ducc.common.boot.DuccDaemonRuntimeProperties; @@ -138,7 +138,7 @@ implements ProcessManager { return sb.toString(); } - public void dispatchStateUpdateToAgents(ConcurrentHashMap<DuccId, IDuccWork> workMap, long sequence) { + public void dispatchStateUpdateToAgents(Map<DuccId, IDuccWork> workMap, long sequence) { String methodName="dispatchStateUpdateToAgents"; try { dumpState(workMap); @@ -265,7 +265,7 @@ implements ProcessManager { (process.getProcessJmxUrl() == null ? "N/A" : process.getProcessJmxUrl() )); } - private void dumpState(ConcurrentHashMap<DuccId, IDuccWork> workMap) { + private void dumpState(Map<DuccId, IDuccWork> workMap) { String methodName="dumpState"; try { StringBuffer sb = new StringBuffer(); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java Thu May 28 14:04:24 2015 @@ -54,6 +54,7 @@ import org.apache.uima.ducc.transport.ev 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; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkReservation; import org.apache.uima.ducc.transport.event.common.IDuccWorkService; import org.apache.uima.ducc.transport.event.common.IDuccWorkService.ServiceDeploymentType; @@ -857,7 +858,7 @@ public class JobManagerConverter } boolean first_or_state = true; - public void eventArrives(DuccWorkMap jobMap) + public void eventArrives(IDuccWorkMap jobMap) { String methodName = "eventArrives"; @@ -902,8 +903,8 @@ public class JobManagerConverter @SuppressWarnings("unchecked") DuccMapDifference<DuccId, IDuccWork> diffmap = DuccCollectionUtils.difference(jobMap, localMap); - for ( IDuccWork w : jobMap.values() ) { - //IDuccWork j = (IDuccWork) w; + for ( Object o : jobMap.values() ) { + IDuccWork w = (IDuccWork) o; logger.trace(methodName, w.getDuccId(), "Arrives in JmStateEvent state =", w.getStateObject()); } @@ -1186,11 +1187,12 @@ public class JobManagerConverter * startup and OR will not start if there is no JD node, so we do normal init stability. Otherwise, we assume that the * JD node is included, build the resource map, and allow scheduling to proceed. */ - boolean recoverFromOrchestrator(DuccWorkMap jobmap) + boolean recoverFromOrchestrator(IDuccWorkMap jobmap) { String methodName = "recoverFromOrchestrator"; Map<Node, Node> nodes = new HashMap<Node, Node>(); - for ( IDuccWork w : jobmap.values() ) { + for ( Object o : jobmap.values() ) { + IDuccWork w = (IDuccWork) o; String prefix = "?"; switch ( w.getDuccType() ) { case Job: Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManager.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManager.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManager.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManager.java Thu May 28 14:04:24 2015 @@ -19,7 +19,7 @@ package org.apache.uima.ducc.rm; import org.apache.uima.ducc.transport.event.RmStateDuccEvent; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; public interface ResourceManager { @@ -28,5 +28,5 @@ public interface ResourceManager // public void onNodeMetricsUpdate(Node node); // public void nodeArrives(Node node); - public void onOrchestratorStateUpdate(DuccWorkMap map); + public void onOrchestratorStateUpdate(IDuccWorkMap map); } Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManagerComponent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManagerComponent.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManagerComponent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/ResourceManagerComponent.java Thu May 28 14:04:24 2015 @@ -45,7 +45,7 @@ import org.apache.uima.ducc.rm.scheduler import org.apache.uima.ducc.rm.scheduler.Scheduler; import org.apache.uima.ducc.transport.dispatcher.DuccEventDispatcher; import org.apache.uima.ducc.transport.event.RmStateDuccEvent; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; public class ResourceManagerComponent @@ -347,7 +347,7 @@ public class ResourceManagerComponent } } - public void onOrchestratorStateUpdate(DuccWorkMap map) + public void onOrchestratorStateUpdate(IDuccWorkMap map) { String methodName = "onJobManagerStateUpdate"; Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/IServiceManager.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/IServiceManager.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/IServiceManager.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/IServiceManager.java Thu May 28 14:04:24 2015 @@ -30,7 +30,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.ServiceStartEvent; import org.apache.uima.ducc.transport.event.ServiceStopEvent; import org.apache.uima.ducc.transport.event.ServiceUnregisterEvent; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.sm.ServiceMap; /** @@ -39,10 +39,10 @@ import org.apache.uima.ducc.transport.ev public interface IServiceManager { // Receive the new map and kick the thread to process it - public void orchestratorStateArrives(DuccWorkMap workMap); + public void orchestratorStateArrives(IDuccWorkMap workMap); // Deal with the incoming orchestrator map - public void processIncoming(DuccWorkMap workMap); + public void processIncoming(IDuccWorkMap workMap); public void register(ServiceRegisterEvent ev); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceManagerComponent.java Thu May 28 14:04:24 2015 @@ -65,6 +65,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; import org.apache.uima.ducc.transport.event.common.IDuccWork; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkService; import org.apache.uima.ducc.transport.event.sm.IService.Trinary; import org.apache.uima.ducc.transport.event.sm.ServiceMap; @@ -367,10 +368,11 @@ public class ServiceManagerComponent * At boot only ... pass in the set of all known active services to each service so it can update * internal state with current published state. */ - public synchronized void bootHandler(DuccWorkMap work) + public synchronized void bootHandler(IDuccWorkMap work) { Map<DuccId, DuccWorkJob> services = new HashMap<DuccId, DuccWorkJob>(); - for ( IDuccWork w : work.values() ) { + for ( Object o : work.values() ) { + IDuccWork w = (IDuccWork) o; if ( w.getDuccType() != DuccType.Service ) continue; DuccWorkJob j = (DuccWorkJob) w; if ( !j.isActive() ) continue; @@ -445,7 +447,7 @@ public class ServiceManagerComponent * * Runs on the incoming thread, do not do anything blocking or timecomsuming here. */ - public synchronized void processIncoming(DuccWorkMap workMap) + public synchronized void processIncoming(IDuccWorkMap workMap) { String methodName = "processIncoming"; @@ -482,7 +484,8 @@ public class ServiceManagerComponent @SuppressWarnings("unchecked") DuccMapDifference<DuccId, IDuccWork> diffmap = DuccCollectionUtils.difference(workMap, localMap); - for ( IDuccWork w : workMap.values() ) { + for ( Object o : workMap.values() ) { + IDuccWork w = (IDuccWork) o; logger.trace(methodName, w.getDuccId(), w.getDuccType(), "Arrives in state =", w.getStateObject()); // if ( w.getDuccId().getFriendly() == 204 ) { // int a = 1; @@ -638,7 +641,7 @@ public class ServiceManagerComponent } int epochCounter = 0; - DuccWorkMap incomingMap = null; + IDuccWorkMap incomingMap = null; public synchronized void runSm() { String methodName = "runSm"; @@ -665,7 +668,7 @@ public class ServiceManagerComponent } } - public synchronized void orchestratorStateArrives(DuccWorkMap map) + public synchronized void orchestratorStateArrives(IDuccWorkMap map) { String methodName = "orchestratorStateArrives"; if ( ! initialized ) { 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=1682253&r1=1682252&r2=1682253&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 14:04:24 2015 @@ -23,10 +23,10 @@ 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.event.common.DuccWorkMap; 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; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkService; public class OrchestratorStateDuccEvent extends AbstractDuccEvent { @@ -36,7 +36,7 @@ public class OrchestratorStateDuccEvent private static DuccId jobid = null; private static DuccLogger logger = null; - private DuccWorkMap workMap = null; + private IDuccWorkMap workMap = null; public OrchestratorStateDuccEvent() { super(EventType.ORCHESTRATOR_STATE); @@ -47,13 +47,13 @@ public class OrchestratorStateDuccEvent logger = duccLogger; } - public void setWorkMap(DuccWorkMap value) { + public void setWorkMap(IDuccWorkMap value) { this.workMap = value.deepCopy(); trim(); } - public DuccWorkMap getWorkMap() { - DuccWorkMap value = this.workMap.deepCopy(); + public IDuccWorkMap getWorkMap() { + IDuccWorkMap value = this.workMap.deepCopy(); return value; } @@ -84,7 +84,8 @@ public class OrchestratorStateDuccEvent private void trim() { String location = "trim"; int bytesTrimmed = 0; - for(DuccId duccId : workMap.keySet()) { + for(Object key : workMap.keySet()) { + DuccId duccId = (DuccId) key; IDuccWork dw = (IDuccWork) workMap.get(duccId); if(dw instanceof IDuccWorkJob) { IDuccWorkJob job = (IDuccWorkJob) dw; Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/DuccWorkMap.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/DuccWorkMap.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/DuccWorkMap.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/DuccWorkMap.java Thu May 28 14:04:24 2015 @@ -17,11 +17,11 @@ * under the License. */ package org.apache.uima.ducc.transport.event.common; -import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -32,9 +32,8 @@ import org.apache.uima.ducc.common.utils import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; import org.apache.uima.ducc.transport.event.common.IDuccWorkService.ServiceDeploymentType; - -@SuppressWarnings({ "rawtypes" }) -public class DuccWorkMap implements IDuccWorkMap, Serializable, Map { +@SuppressWarnings("rawtypes") +public class DuccWorkMap implements IDuccWorkMap { /** * please increment this sUID when removing or modifying a field @@ -120,7 +119,7 @@ public class DuccWorkMap implements IDuc return retVal; } - public ArrayList<DuccWorkJob> getServices(ArrayList<String> implementors) { + public List<DuccWorkJob> getServices(List<String> implementors) { ArrayList<DuccWorkJob> servicesList = new ArrayList<DuccWorkJob>(); if(implementors != null) { if(getServiceKeySet().size()> 0) { Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/IDuccWorkMap.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/IDuccWorkMap.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/IDuccWorkMap.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/common/IDuccWorkMap.java Thu May 28 14:04:24 2015 @@ -18,16 +18,37 @@ */ package org.apache.uima.ducc.transport.event.common; +import java.io.Serializable; +import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.uima.ducc.common.utils.id.DuccId; +import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; -public interface IDuccWorkMap { +@SuppressWarnings("rawtypes") +public interface IDuccWorkMap extends Serializable, Map { + + public IDuccWorkMap deepCopy(); public Set<DuccId> getJobKeySet(); public Set<DuccId> getServiceKeySet(); + public Set<DuccId> getReservationKeySet(); public Set<DuccId> getManagedReservationKeySet(); + public int getJobCount(); + public int getServiceCount(); + public int getReservationCount(); + public IDuccWork findDuccWork(DuccId duccId); public IDuccWork findDuccWork(String duccId); + public IDuccWork findDuccWork(DuccType duccType, String id); + + public List<DuccWorkJob> getServices(List<String> implementors); + + public boolean isJobDriverNodeAssigned(); + public Map<DuccId,IDuccWork> getMap(); + public int getJobDriverNodeCount(); + + public void addDuccWork(IDuccWork duccWork); } Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccData.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccData.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccData.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccData.java Thu May 28 14:04:24 2015 @@ -32,6 +32,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; import org.apache.uima.ducc.transport.event.common.IDuccWork; import org.apache.uima.ducc.transport.event.common.IDuccWorkJob; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkService.ServiceDeploymentType; import org.apache.uima.ducc.transport.event.common.history.HistoryPersistenceManager; import org.apache.uima.ducc.transport.event.common.history.IHistoryPersistenceManager; @@ -42,8 +43,8 @@ public class DuccData { private static DuccLogger logger = DuccLoggerComponents.getWsLogger(DuccData.class.getName()); private static DuccId jobid = null; - private static DuccWorkMap duccWorkMap = new DuccWorkMap(); - private static DuccWorkMap duccWorkLive = new DuccWorkMap(); + private static IDuccWorkMap duccWorkMap = new DuccWorkMap(); + private static IDuccWorkMap duccWorkLive = new DuccWorkMap(); private static ConcurrentSkipListMap<JobInfo,JobInfo> sortedJobs = new ConcurrentSkipListMap<JobInfo,JobInfo>(); private static ConcurrentSkipListMap<DuccId,JobInfo> keyMapJobs = new ConcurrentSkipListMap<DuccId,JobInfo>(); @@ -93,7 +94,8 @@ public class DuccData { } } - private void mergeHistory(DuccWorkMap map) { + @SuppressWarnings("unchecked") + private void mergeHistory(IDuccWorkMap map) { Iterator<DuccId> iterator = duccWorkLive.keySet().iterator(); while(iterator.hasNext()) { DuccId duccId = iterator.next(); @@ -116,12 +118,13 @@ public class DuccData { } } - public void put(DuccWorkMap map) { + public void put(IDuccWorkMap map) { String location = "put"; synchronized(this) { - DuccWorkMap mapCopy = map.deepCopy(); + IDuccWorkMap mapCopy = map.deepCopy(); mergeHistory(map); duccWorkLive = mapCopy; + @SuppressWarnings("unchecked") Iterator<DuccId> iterator = map.keySet().iterator(); while(iterator.hasNext()) { DuccId duccId = iterator.next(); @@ -254,11 +257,11 @@ public class DuccData { logger.debug(location, jobid, ""+jc+":"+rc+":"+sc+":"+cc); } - public DuccWorkMap get() { + public IDuccWorkMap get() { return duccWorkMap; } - public DuccWorkMap getLive() { + public IDuccWorkMap getLive() { return duccWorkLive; } Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/DuccMachinesData.java Thu May 28 14:04:24 2015 @@ -43,12 +43,12 @@ import org.apache.uima.ducc.common.utils import org.apache.uima.ducc.common.utils.id.DuccId; import org.apache.uima.ducc.transport.event.NodeMetricsUpdateDuccEvent; import org.apache.uima.ducc.transport.event.ProcessInfo; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcessMap; import org.apache.uima.ducc.transport.event.common.IDuccReservation; import org.apache.uima.ducc.transport.event.common.IDuccReservationMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkJob; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkReservation; import org.apache.uima.ducc.transport.event.common.IProcessState.ProcessState; import org.apache.uima.ducc.ws.server.DuccConstants; @@ -424,7 +424,7 @@ public class DuccMachinesData { String location = "getShareMapJobs"; try { DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.getLive(); + IDuccWorkMap duccWorkMap = duccData.getLive(); Iterator<DuccId> iteratorJ = duccWorkMap.getJobKeySet().iterator(); while(iteratorJ.hasNext()) { DuccId jobid = iteratorJ.next(); @@ -471,7 +471,7 @@ public class DuccMachinesData { String location = "getShareMapServices"; try { DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.getLive(); + IDuccWorkMap duccWorkMap = duccData.getLive(); Iterator<DuccId> iteratorS = duccWorkMap.getServiceKeySet().iterator(); while(iteratorS.hasNext()) { DuccId jobid = iteratorS.next(); @@ -518,7 +518,7 @@ public class DuccMachinesData { String location = "getShareMapReservations"; try { DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.getLive(); + IDuccWorkMap duccWorkMap = duccData.getLive(); Iterator<DuccId> iteratorR = duccWorkMap.getReservationKeySet().iterator(); while(iteratorR.hasNext()) { DuccId reservationId = iteratorR.next(); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/WebServerComponent.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/WebServerComponent.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/WebServerComponent.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/WebServerComponent.java Thu May 28 14:04:24 2015 @@ -37,7 +37,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.PmStateDuccEvent; import org.apache.uima.ducc.transport.event.RmStateDuccEvent; import org.apache.uima.ducc.transport.event.SmStateDuccEvent; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.ws.registry.ServicesRegistry; import org.apache.uima.ducc.ws.server.DuccListeners; import org.apache.uima.ducc.ws.server.DuccWebServer; @@ -116,7 +116,7 @@ implements IWebServer { duccLogger.trace(methodName, jobid, duccMsg.fetch("enter")); duccLogger.debug(methodName, jobid, duccMsg.fetchLabel("received")+"OrchestratorStateDuccEvent"); DuccDaemonsData.getInstance().put(duccEvent); - DuccWorkMap wm = duccEvent.getWorkMap(); + IDuccWorkMap wm = duccEvent.getWorkMap(); boolean change = false; int count; count = wm.getJobCount(); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/ServicesHelper.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/ServicesHelper.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/ServicesHelper.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/ServicesHelper.java Thu May 28 14:04:24 2015 @@ -19,15 +19,16 @@ package org.apache.uima.ducc.ws.registry; import java.util.ArrayList; +import java.util.List; import java.util.Properties; import org.apache.uima.ducc.common.utils.DuccLogger; import org.apache.uima.ducc.common.utils.DuccLoggerComponents; import org.apache.uima.ducc.common.utils.id.DuccId; import org.apache.uima.ducc.transport.event.common.DuccWorkJob; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcessMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.ws.DuccData; import org.apache.uima.ducc.ws.DuccDataHelper; @@ -73,10 +74,10 @@ public class ServicesHelper { return implementors.size(); } - public ArrayList<DuccWorkJob> getServicesList(ServicesRegistry servicesRegistry, Properties propertiesMeta) { - ArrayList<DuccWorkJob> retVal = new ArrayList<DuccWorkJob>(); - ArrayList<String> implementors = getImplementors(servicesRegistry, propertiesMeta); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + public List<DuccWorkJob> getServicesList(ServicesRegistry servicesRegistry, Properties propertiesMeta) { + List<DuccWorkJob> retVal = new ArrayList<DuccWorkJob>(); + List<String> implementors = getImplementors(servicesRegistry, propertiesMeta); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); retVal = duccWorkMap.getServices(implementors); return retVal; } @@ -85,7 +86,7 @@ public class ServicesHelper { String location = "getPgin"; String id = getId(servicesRegistry, propertiesMeta); long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); + List<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { @@ -103,7 +104,7 @@ public class ServicesHelper { String location = "getSwap"; String id = getId(servicesRegistry, propertiesMeta); long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); + List<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { @@ -121,7 +122,7 @@ public class ServicesHelper { String location = "getSwapMax"; String id = getId(servicesRegistry, propertiesMeta); long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); + List<DuccWorkJob> servicesList = getServicesList(servicesRegistry, propertiesMeta); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServicesHelper.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServicesHelper.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServicesHelper.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/registry/sort/ServicesHelper.java Thu May 28 14:04:24 2015 @@ -19,12 +19,13 @@ package org.apache.uima.ducc.ws.registry.sort; import java.util.ArrayList; +import java.util.List; import org.apache.uima.ducc.common.utils.id.DuccId; import org.apache.uima.ducc.transport.event.common.DuccWorkJob; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcessMap; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.ws.DuccData; public class ServicesHelper { @@ -81,17 +82,17 @@ public class ServicesHelper { return retVal.toString(); } - public ArrayList<DuccWorkJob> getServicesList(IServiceAdapter serviceAdapter) { - ArrayList<DuccWorkJob> retVal = new ArrayList<DuccWorkJob>(); - ArrayList<String> implementors = serviceAdapter.getImplementors(); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + public List<DuccWorkJob> getServicesList(IServiceAdapter serviceAdapter) { + List<DuccWorkJob> retVal = new ArrayList<DuccWorkJob>(); + List<String> implementors = serviceAdapter.getImplementors(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); retVal = duccWorkMap.getServices(implementors); return retVal; } public long getPgIn(IServiceAdapter serviceAdapter) { long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(serviceAdapter); + List<DuccWorkJob> servicesList = getServicesList(serviceAdapter); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { @@ -106,7 +107,7 @@ public class ServicesHelper { public long getSwap(IServiceAdapter serviceAdapter) { long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(serviceAdapter); + List<DuccWorkJob> servicesList = getServicesList(serviceAdapter); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { @@ -121,7 +122,7 @@ public class ServicesHelper { public long getSwapMax(IServiceAdapter serviceAdapter) { long retVal = 0; - ArrayList<DuccWorkJob> servicesList = getServicesList(serviceAdapter); + List<DuccWorkJob> servicesList = getServicesList(serviceAdapter); for(DuccWorkJob service : servicesList) { IDuccProcessMap map = service.getProcessMap(); for(DuccId key : map.keySet()) { Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccHandler.java Thu May 28 14:04:24 2015 @@ -74,7 +74,6 @@ import org.apache.uima.ducc.transport.ag import org.apache.uima.ducc.transport.event.ProcessInfo; import org.apache.uima.ducc.transport.event.cli.SpecificationProperties; import org.apache.uima.ducc.transport.event.common.DuccWorkJob; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcess.ReasonForStoppingProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcessMap; @@ -83,6 +82,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.common.IDuccState.JobState; import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; import org.apache.uima.ducc.transport.event.common.IDuccWorkJob; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkReservation; import org.apache.uima.ducc.transport.event.common.IProcessState.ProcessState; import org.apache.uima.ducc.transport.event.common.IResourceState.ProcessDeallocationType; @@ -1444,7 +1444,7 @@ public class DuccHandler extends DuccAbs private IDuccWorkJob findJob(String jobno) { IDuccWorkJob job = null; - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); if(duccWorkMap.getJobKeySet().size()> 0) { Iterator<DuccId> iterator = null; iterator = duccWorkMap.getJobKeySet().iterator(); @@ -1467,7 +1467,7 @@ public class DuccHandler extends DuccAbs duccLogger.trace(methodName, null, messages.fetch("enter")); StringBuffer sb = new StringBuffer(); String jobno = request.getParameter("id"); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); DuccWorkJob job = null; if(duccWorkMap.getJobKeySet().size()> 0) { Iterator<DuccId> iterator = null; @@ -1528,7 +1528,7 @@ public class DuccHandler extends DuccAbs private DuccWorkJob getJob(String jobNo) { DuccWorkJob job = null; - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); if(duccWorkMap.getJobKeySet().size()> 0) { Iterator<DuccId> iterator = null; iterator = duccWorkMap.getJobKeySet().iterator(); @@ -1546,7 +1546,7 @@ public class DuccHandler extends DuccAbs private DuccWorkJob getManagedReservation(String reservationNo) { DuccWorkJob managedReservation = null; - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); if(duccWorkMap.getServiceKeySet().size()> 0) { Iterator<DuccId> iterator = null; iterator = duccWorkMap.getServiceKeySet().iterator(); @@ -2206,7 +2206,7 @@ public class DuccHandler extends DuccAbs ArrayList<String> implementors = DuccDataHelper.parseServiceIdsAsList(properties); DuccWorkJob service = null; - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); if(duccWorkMap.getServiceKeySet().size()> 0) { Iterator<DuccId> iterator = null; iterator = duccWorkMap.getServiceKeySet().iterator(); @@ -2458,7 +2458,7 @@ public class DuccHandler extends DuccAbs StringBuffer sb = new StringBuffer(); String reservationNo = request.getParameter("id"); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); DuccWorkJob managedReservation = null; if(duccWorkMap.getServiceKeySet().size()> 0) { Iterator<DuccId> iterator = null; @@ -2576,8 +2576,8 @@ public class DuccHandler extends DuccAbs // UIMA-4258, use common implementors parser ArrayList<String> implementors = DuccDataHelper.parseServiceIdsAsList(properties); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); - ArrayList<DuccWorkJob> servicesList = duccWorkMap.getServices(implementors); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); + List<DuccWorkJob> servicesList = duccWorkMap.getServices(implementors); int counter = 0; ShareType type = ShareType.SPU; String service_type = properties.getProperty(IServicesRegistry.service_type); @@ -3563,7 +3563,7 @@ public class DuccHandler extends DuccAbs String methodName = "handleDuccServletClusterName"; duccLogger.trace(methodName, null, messages.fetch("enter")); StringBuffer sb = new StringBuffer(); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); if(duccWorkMap.size()> 0) { sb.append("<span title=\"home="+dir_home+"\">"); sb.append(getDuccWebServer().getClusterName()); @@ -3961,7 +3961,7 @@ public class DuccHandler extends DuccAbs String idPro = request.getParameter(pname_idPro); StringBuffer sb = new StringBuffer(); - DuccWorkMap duccWorkMap = DuccData.getInstance().get(); + IDuccWorkMap duccWorkMap = DuccData.getInstance().get(); DuccWorkJob job = null; if(duccWorkMap.getJobKeySet().size()> 0) { Iterator<DuccId> iterator = null; @@ -4069,7 +4069,7 @@ public class DuccHandler extends DuccAbs String value = request.getParameter(name).trim(); duccLogger.info(methodName, null, messages.fetchLabel("cancel")+value); DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.get(); + IDuccWorkMap duccWorkMap = duccData.get(); String text; String result; IDuccWorkJob duccWorkJob = (IDuccWorkJob) duccWorkMap.findDuccWork(DuccType.Job, value); @@ -4180,7 +4180,7 @@ public class DuccHandler extends DuccAbs String value = request.getParameter(name).trim(); duccLogger.info(methodName, null, messages.fetchLabel("cancel")+value); DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.get(); + IDuccWorkMap duccWorkMap = duccData.get(); String text; String result; IDuccWorkReservation duccWorkReservation = (IDuccWorkReservation) duccWorkMap.findDuccWork(DuccType.Reservation, value); @@ -4247,7 +4247,7 @@ public class DuccHandler extends DuccAbs String value = request.getParameter(name).trim(); duccLogger.info(methodName, null, messages.fetchLabel("cancel")+value); DuccData duccData = DuccData.getInstance(); - DuccWorkMap duccWorkMap = duccData.get(); + IDuccWorkMap duccWorkMap = duccData.get(); String text; String result; IDuccWorkJob duccWorkJob = (IDuccWorkJob) duccWorkMap.findDuccWork(DuccType.Service, value); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorJob.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorJob.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorJob.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorJob.java Thu May 28 14:04:24 2015 @@ -35,11 +35,11 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.cli.JobRequestProperties; import org.apache.uima.ducc.transport.event.cli.SpecificationProperties; import org.apache.uima.ducc.transport.event.common.DuccWorkJob; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccSchedulingInfo; import org.apache.uima.ducc.transport.event.common.IDuccState.JobState; import org.apache.uima.ducc.transport.event.common.IDuccWork; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IRationale; import org.apache.uima.ducc.ws.authentication.DuccAsUser; @@ -63,7 +63,7 @@ public class DuccWebMonitorJob { String location = "monitor"; duccLogger.trace(location, jobid, "enter"); - DuccWorkMap dwm = duccEvent.getWorkMap(); + IDuccWorkMap dwm = duccEvent.getWorkMap(); int size = dwm.getJobKeySet().size(); duccLogger.debug(location, jobid, "jobs: "+size); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorManagedReservation.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorManagedReservation.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorManagedReservation.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorManagedReservation.java Thu May 28 14:04:24 2015 @@ -34,10 +34,10 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.cli.JobRequestProperties; import org.apache.uima.ducc.transport.event.cli.SpecificationProperties; import org.apache.uima.ducc.transport.event.common.DuccWorkJob; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccState.JobState; import org.apache.uima.ducc.transport.event.common.IDuccWork; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IRationale; import org.apache.uima.ducc.ws.authentication.DuccAsUser; @@ -61,7 +61,7 @@ public class DuccWebMonitorManagedReserv String location = "monitor"; duccLogger.trace(location, jobid, "enter"); - DuccWorkMap dwm = duccEvent.getWorkMap(); + IDuccWorkMap dwm = duccEvent.getWorkMap(); int size = dwm.getManagedReservationKeySet().size(); duccLogger.debug(location, jobid, "managed reservations: "+size); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorReservation.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorReservation.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorReservation.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/DuccWebMonitorReservation.java Thu May 28 14:04:24 2015 @@ -33,11 +33,11 @@ import org.apache.uima.ducc.common.utils import org.apache.uima.ducc.transport.event.OrchestratorStateDuccEvent; import org.apache.uima.ducc.transport.event.cli.JobRequestProperties; import org.apache.uima.ducc.transport.event.cli.SpecificationProperties; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.DuccWorkReservation; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccState.JobState; import org.apache.uima.ducc.transport.event.common.IDuccWork; +import org.apache.uima.ducc.transport.event.common.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IRationale; import org.apache.uima.ducc.ws.DuccData; import org.apache.uima.ducc.ws.authentication.DuccAsUser; @@ -62,7 +62,7 @@ public class DuccWebMonitorReservation { String location = "monitor"; duccLogger.trace(location, jobid, "enter"); - DuccWorkMap dwm = duccEvent.getWorkMap(); + IDuccWorkMap dwm = duccEvent.getWorkMap(); int size = dwm.getReservationKeySet().size(); duccLogger.debug(location, jobid, "reservations: "+size); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java?rev=1682253&r1=1682252&r2=1682253&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-web/src/main/java/org/apache/uima/ducc/ws/server/nodeviz/NodeViz.java Thu May 28 14:04:24 2015 @@ -31,7 +31,6 @@ import org.apache.uima.ducc.common.utils import org.apache.uima.ducc.common.utils.SystemPropertyResolver; import org.apache.uima.ducc.common.utils.Version; import org.apache.uima.ducc.transport.event.OrchestratorStateDuccEvent; -import org.apache.uima.ducc.transport.event.common.DuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccProcess; import org.apache.uima.ducc.transport.event.common.IDuccProcessMap; import org.apache.uima.ducc.transport.event.common.IDuccReservation; @@ -41,6 +40,7 @@ import org.apache.uima.ducc.transport.ev import org.apache.uima.ducc.transport.event.common.IDuccTypes.DuccType; 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.IDuccWorkMap; import org.apache.uima.ducc.transport.event.common.IDuccWorkReservation; import org.apache.uima.ducc.transport.event.common.IDuccWorkService; import org.apache.uima.ducc.transport.event.common.IDuccWorkService.ServiceDeploymentType; @@ -118,7 +118,7 @@ public class NodeViz String methodName = "generateVisualization"; Map<String, VisualizedHost> hosts = new HashMap<String, VisualizedHost>(); - DuccWorkMap jobmap = ev.getWorkMap(); + IDuccWorkMap jobmap = ev.getWorkMap(); int job_shares = 0; int service_shares = 0; @@ -133,7 +133,8 @@ public class NodeViz // move all onther 'not up' hosts to the end // finally, walk the list and make them render - for ( IDuccWork w : jobmap.values() ) { + for ( Object o : jobmap.values() ) { + IDuccWork w = (IDuccWork) o; DuccType type = w.getDuccType(); String service_endpoint = null; String service_id = null; // UIMA-4209