*/
@SuppressWarnings("rawtypes")
@Override
public Map<String, DAGNode> getDagNodeNameMap(String workflowId) throws IOException {
WorkflowId id = WorkflowId.parseString(workflowId);
Flow flow = flowQueueService.getFlowFromQueue(
id.getCluster(), id.getTimestamp(), id.getFlowId());
if (flow == null) {
return null;
}
// TODO This may not work nicely with multiple type of jobs
// See: https://github.com/twitter/ambrose/pull/131
Map<String, DAGNode> dagMap = JSONUtil.toObject(
flow.getJobGraphJSON(), new TypeReference<Map<String, DAGNode>>() {
});
return dagMap;
}