use of co.cask.cdap.internal.app.runtime.workflow.WorkflowProgramInfo in project cdap by caskdata.
the class MapReduceContextConfig method getWorkflowProgramInfo.
/**
* Returns the {@link WorkflowProgramInfo} if it is running inside Workflow or {@code null} if not.
*/
@Nullable
WorkflowProgramInfo getWorkflowProgramInfo() {
String info = hConf.get(HCONF_ATTR_WORKFLOW_INFO);
if (info == null) {
return null;
}
WorkflowProgramInfo workflowProgramInfo = GSON.fromJson(info, WorkflowProgramInfo.class);
workflowProgramInfo.getWorkflowToken().disablePut();
return workflowProgramInfo;
}
Aggregations