private String getJSONTask(org.apache.hadoop.hive.ql.plan.api.Task task) { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("taskId", task.getTaskId())); sb.append(getJSONKeyValue("taskType", task.getTaskType())); sb.append(getJSONKeyValue("taskAttributes", getJSONMap(task.getTaskAttributes()))); sb.append(getJSONKeyValue("taskCounters", getJSONMap(task.getTaskCounters()))); sb.append(getJSONKeyValue("operatorGraph", getJSONGraph(task.getOperatorGraph()))); // operator list List<String> opList = new ArrayList<String>(); if (task.getOperatorList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Operator op : task.getOperatorList()) { opList.add(getJSONOperator(op)); } } sb.append(getJSONKeyValue("operatorList", getJSONList(opList))); sb.append(getJSONKeyValue("done", task.isDone())); sb.append(getJSONKeyValue("started", task.isStarted())); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
private String getJSONTask(org.apache.hadoop.hive.ql.plan.api.Task task) { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("taskId", task.getTaskId())); sb.append(getJSONKeyValue("taskType", task.getTaskType())); sb.append(getJSONKeyValue("taskAttributes", getJSONMap(task.getTaskAttributes()))); sb.append(getJSONKeyValue("taskCounters", getJSONMap(task.getTaskCounters()))); sb.append(getJSONKeyValue("operatorGraph", getJSONGraph(task.getOperatorGraph()))); // operator list List<String> opList = new ArrayList<String>(); if (task.getOperatorList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Operator op : task.getOperatorList()) { opList.add(getJSONOperator(op)); } } sb.append(getJSONKeyValue("operatorList", getJSONList(opList))); sb.append(getJSONKeyValue("done", task.isDone())); sb.append(getJSONKeyValue("started", task.isStarted())); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
task.getOperatorGraph().setNodeType(NodeType.OPERATOR); task.getOperatorGraph().addToAdjacencyList(entry);
public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case TASK_TYPE: return getTaskType(); case TASK_ATTRIBUTES: return getTaskAttributes(); case TASK_COUNTERS: return getTaskCounters(); case OPERATOR_GRAPH: return getOperatorGraph(); case OPERATOR_LIST: return getOperatorList(); case DONE: return isDone(); case STARTED: return isStarted(); } throw new IllegalStateException(); }
task.getOperatorGraph().setNodeType(NodeType.OPERATOR); task.getOperatorGraph().addToAdjacencyList(entry);
public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case TASK_TYPE: return getTaskType(); case TASK_ATTRIBUTES: return getTaskAttributes(); case TASK_COUNTERS: return getTaskCounters(); case OPERATOR_GRAPH: return getOperatorGraph(); case OPERATOR_LIST: return getOperatorList(); case DONE: return isDone(); case STARTED: return isStarted(); } throw new IllegalStateException(); }
private String getJSONTask(org.apache.hadoop.hive.ql.plan.api.Task task) { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("taskId", task.getTaskId())); sb.append(getJSONKeyValue("taskType", task.getTaskType())); sb.append(getJSONKeyValue("taskAttributes", getJSONMap(task.getTaskAttributes()))); sb.append(getJSONKeyValue("taskCounters", getJSONMap(task.getTaskCounters()))); sb.append(getJSONKeyValue("operatorGraph", getJSONGraph(task.getOperatorGraph()))); // operator list List<String> opList = new ArrayList<String>(); if (task.getOperatorList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Operator op : task.getOperatorList()) { opList.add(getJSONOperator(op)); } } sb.append(getJSONKeyValue("operatorList", getJSONList(opList))); sb.append(getJSONKeyValue("done", task.isDone())); sb.append(getJSONKeyValue("started", task.isStarted())); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
private String getJSONTask(org.apache.hadoop.hive.ql.plan.api.Task task) { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("taskId", task.getTaskId())); sb.append(getJSONKeyValue("taskType", task.getTaskType())); sb.append(getJSONKeyValue("taskAttributes", getJSONMap(task.getTaskAttributes()))); sb.append(getJSONKeyValue("taskCounters", getJSONMap(task.getTaskCounters()))); sb.append(getJSONKeyValue("operatorGraph", getJSONGraph(task.getOperatorGraph()))); // operator list List<String> opList = new ArrayList<String>(); if (task.getOperatorList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Operator op : task.getOperatorList()) { opList.add(getJSONOperator(op)); } } sb.append(getJSONKeyValue("operatorList", getJSONList(opList))); sb.append(getJSONKeyValue("done", task.isDone())); sb.append(getJSONKeyValue("started", task.isStarted())); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case TASK_TYPE: return getTaskType(); case TASK_ATTRIBUTES: return getTaskAttributes(); case TASK_COUNTERS: return getTaskCounters(); case OPERATOR_GRAPH: return getOperatorGraph(); case OPERATOR_LIST: return getOperatorList(); case DONE: return Boolean.valueOf(isDone()); case STARTED: return Boolean.valueOf(isStarted()); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case TASK_ID: return getTaskId(); case TASK_TYPE: return getTaskType(); case TASK_ATTRIBUTES: return getTaskAttributes(); case TASK_COUNTERS: return getTaskCounters(); case OPERATOR_GRAPH: return getOperatorGraph(); case OPERATOR_LIST: return getOperatorList(); case DONE: return new Boolean(isDone()); case STARTED: return new Boolean(isStarted()); } throw new IllegalStateException(); }
task.getOperatorGraph().setNodeType(NodeType.OPERATOR); task.getOperatorGraph().addToAdjacencyList(entry);
task.getOperatorGraph().setNodeType(NodeType.OPERATOR); task.getOperatorGraph().addToAdjacencyList(entry);