chrismattmann commented on a change in pull request #131: Changed the map and reduce function to work with XmlRpcWorkflowManger URL: https://github.com/apache/drat/pull/131#discussion_r193807586
########## File path: proteus/src/main/java/backend/ProcessDratWrapper.java ########## @@ -310,36 +391,65 @@ private boolean mapsStillRunning() throws Exception { return items; } - @VisibleForTesting - protected boolean stillRunning(List<WorkflowItem> items) { - List<WorkflowItem> mapperItems = filterMappers(items); - LOG.info("Checking mappers: inspecting [" - + String.valueOf(mapperItems.size()) + "] mappers."); - for (WorkflowItem mapperItem : mapperItems) { - if (isRunning(mapperItem.getStatus())) { - LOG.info("Mapper: [" + mapperItem.getId() + "] still running."); - return true; + protected boolean stillRunning(List<WorkflowInstance> instances){ + List<WorkflowInstance> mapperInstances = filterMappers(instances); + LOG.info("Checking mappers: inspecting [" + + String.valueOf(mapperInstances.size()) + "] mappers."); + for(WorkflowInstance mapperInstance:mapperInstances){ + if(isRunning(mapperInstance.getState().getName())){ + LOG.info("Mapper: [" + mapperInstance.getId() + "] still running."); + return true; + } } - } + return false; - return false; } - @VisibleForTesting - protected List<WorkflowItem> filterMappers(List<WorkflowItem> items) { - List<WorkflowItem> mappers = new ArrayList<WorkflowItem>(); - if (items != null && items.size() > 0) { - for (WorkflowItem item : items) { - if (item.getCurrentTask().equals(MAPPER_TASK)) { - LOG.info("Adding mapper: [" + item.getCurrentTask() + "]"); - mappers.add(item); - } else { - LOG.info("Filtering task: [" + item.getCurrentTask() + "]"); - } +// @VisibleForTesting Review comment: remove all of this if it's commented out ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services