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_r194242488
########## File path: proteus/src/main/java/backend/ProcessDratWrapper.java ########## @@ -128,17 +157,43 @@ private synchronized void solrIndex() throws InstantiationException, SolrServerE sIndexer.commit(); sIndexer.optimize(); idl.logInfo("Completed",null); - } @Override - public void map() throws IOException, DratWrapperException { - simpleDratExec(MAP_CMD); + public void map() { + setStatus(MAP_CMD); + DratLog mapLog = new DratLog("MAPPING"); + WorkflowRestResource restResource = new WorkflowRestResource(); + DynamicWorkflowRequestWrapper requestBody = new DynamicWorkflowRequestWrapper(); + requestBody.taskIds = new ArrayList<>(); + requestBody.taskIds.add("urn:drat:MimePartitioner"); + LOG.info("STARTING MAPPING"); + mapLog.logInfo("STARTING", " (dynamic workflow with task urn:drat:MimePartitioner"); + String resp = restResource.performDynamicWorkFlow(requestBody); + if(resp.equals("OK")) { + mapLog.logInfo("STARTED SUCCESSFULLY, urn:drat:MimePartitioner dynamic workflow"); + }else { + mapLog.logSevere("FAILED", "Dynamic workflow starting failed "+resp); + } } @Override - public void reduce() throws IOException, DratWrapperException { - simpleDratExec(REDUCE_CMD); + public void reduce() throws IOException { + setStatus(REDUCE_CMD); + DratLog mapLog = new DratLog("REDUCING"); + WorkflowRestResource restResource = new WorkflowRestResource(); + DynamicWorkflowRequestWrapper requestBody = new DynamicWorkflowRequestWrapper(); + requestBody.taskIds = new ArrayList<>(); + requestBody.taskIds.add("urn:drat:RatAggregator"); Review comment: this should be a static final String key like REDUCE_TASK at the top. ---------------------------------------------------------------- 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