@Override public WorkflowToken getWorkflowToken() { BasicWorkflowToken workflowTokenFromContext = context.getWorkflowToken(); if (workflowTokenFromContext == null) { throw new IllegalStateException("WorkflowToken cannot be null when the " + "MapReduce program is started by Workflow."); } try { workflowTokenFromContext.setMapReduceCounters(((Job) context.getHadoopJob()).getCounters()); return workflowTokenFromContext; } catch (IOException e) { throw Throwables.propagate(e); } }
@Override public WorkflowToken getWorkflowToken() { BasicWorkflowToken workflowTokenFromContext = context.getWorkflowToken(); if (workflowTokenFromContext == null) { throw new IllegalStateException("WorkflowToken cannot be null when the " + "MapReduce program is started by Workflow."); } try { workflowTokenFromContext.setMapReduceCounters(((Job) context.getHadoopJob()).getCounters()); return workflowTokenFromContext; } catch (IOException e) { throw Throwables.propagate(e); } }