public Object getFieldValue(_Fields field) { switch (field) { case NODE_TYPE: return getNodeType(); case ROOTS: return getRoots(); case ADJACENCY_LIST: return getAdjacencyList(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case NODE_TYPE: return getNodeType(); case ROOTS: return getRoots(); case ADJACENCY_LIST: return getAdjacencyList(); } throw new IllegalStateException(); }
private Object getJSONGraph(org.apache.hadoop.hive.ql.plan.api.Graph graph) { if (graph == null) { return "null"; } StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("nodeType", graph.getNodeType())); sb.append(getJSONKeyValue("roots", getJSONList(graph.getRoots()))); // adjacency list List<String> adjList = new ArrayList<String>(); if (graph.getAdjacencyList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Adjacency adj : graph .getAdjacencyList()) { adjList.add(getJSONAdjacency(adj)); } } sb.append(getJSONKeyValue("adjacencyList", getJSONList(adjList))); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
private Object getJSONGraph(org.apache.hadoop.hive.ql.plan.api.Graph graph) { if (graph == null) { return "null"; } StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("nodeType", graph.getNodeType())); sb.append(getJSONKeyValue("roots", getJSONList(graph.getRoots()))); // adjacency list List<String> adjList = new ArrayList<String>(); if (graph.getAdjacencyList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Adjacency adj : graph .getAdjacencyList()) { adjList.add(getJSONAdjacency(adj)); } } sb.append(getJSONKeyValue("adjacencyList", getJSONList(adjList))); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
public Object getFieldValue(_Fields field) { switch (field) { case NODE_TYPE: return getNodeType(); case ROOTS: return getRoots(); case ADJACENCY_LIST: return getAdjacencyList(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case NODE_TYPE: return getNodeType(); case ROOTS: return getRoots(); case ADJACENCY_LIST: return getAdjacencyList(); } throw new IllegalStateException(); }
private Object getJSONGraph(org.apache.hadoop.hive.ql.plan.api.Graph graph) { if (graph == null) { return "null"; } StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("nodeType", graph.getNodeType())); sb.append(getJSONKeyValue("roots", getJSONList(graph.getRoots()))); // adjacency list List<String> adjList = new ArrayList<String>(); if (graph.getAdjacencyList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Adjacency adj : graph .getAdjacencyList()) { adjList.add(getJSONAdjacency(adj)); } } sb.append(getJSONKeyValue("adjacencyList", getJSONList(adjList))); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }
private Object getJSONGraph(org.apache.hadoop.hive.ql.plan.api.Graph graph) { if (graph == null) { return "null"; } StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append(getJSONKeyValue("nodeType", graph.getNodeType())); sb.append(getJSONKeyValue("roots", getJSONList(graph.getRoots()))); // adjacency list List<String> adjList = new ArrayList<String>(); if (graph.getAdjacencyList() != null) { for (org.apache.hadoop.hive.ql.plan.api.Adjacency adj : graph .getAdjacencyList()) { adjList.add(getJSONAdjacency(adj)); } } sb.append(getJSONKeyValue("adjacencyList", getJSONList(adjList))); sb.deleteCharAt(sb.length() - 1); sb.append("}"); return sb.toString(); }