org.apache.hadoop.hive.ql.plan.api.Query.getQueryAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(91)

本文整理了Java中org.apache.hadoop.hive.ql.plan.api.Query.getQueryAttributes方法的一些代码示例,展示了Query.getQueryAttributes的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getQueryAttributes方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.plan.api.Query
类名称:Query
方法名:getQueryAttributes

Query.getQueryAttributes介绍

暂无

代码示例

代码示例来源:origin: apache/hive

public String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query) {
 StringBuilder sb = new StringBuilder();
 sb.append("{");
 sb.append(getJSONKeyValue("queryId", query.getQueryId()));
 sb.append(getJSONKeyValue("queryType", query.getQueryType()));
 sb.append(getJSONKeyValue("queryAttributes", getJSONMap(query.getQueryAttributes())));
 sb.append(getJSONKeyValue("queryCounters", getJSONMap(query.getQueryCounters())));
 sb.append(getJSONKeyValue("stageGraph", getJSONGraph(query.getStageGraph())));
 // stageList
 List<String> stageList = new ArrayList<String>();
 if (query.getStageList() != null) {
  for (org.apache.hadoop.hive.ql.plan.api.Stage stage : query.getStageList()) {
   stageList.add(getJSONStage(stage));
  }
 }
 sb.append(getJSONKeyValue("stageList", getJSONList(stageList)));
 sb.append(getJSONKeyValue("done", query.isDone()));
 sb.append(getJSONKeyValue("started", query.isStarted()));
 sb.deleteCharAt(sb.length() - 1);
 sb.append("}");
 return sb.toString();
}

代码示例来源:origin: apache/drill

public String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query) {
 StringBuilder sb = new StringBuilder();
 sb.append("{");
 sb.append(getJSONKeyValue("queryId", query.getQueryId()));
 sb.append(getJSONKeyValue("queryType", query.getQueryType()));
 sb.append(getJSONKeyValue("queryAttributes", getJSONMap(query.getQueryAttributes())));
 sb.append(getJSONKeyValue("queryCounters", getJSONMap(query.getQueryCounters())));
 sb.append(getJSONKeyValue("stageGraph", getJSONGraph(query.getStageGraph())));
 // stageList
 List<String> stageList = new ArrayList<String>();
 if (query.getStageList() != null) {
  for (org.apache.hadoop.hive.ql.plan.api.Stage stage : query.getStageList()) {
   stageList.add(getJSONStage(stage));
  }
 }
 sb.append(getJSONKeyValue("stageList", getJSONList(stageList)));
 sb.append(getJSONKeyValue("done", query.isDone()));
 sb.append(getJSONKeyValue("started", query.isStarted()));
 sb.deleteCharAt(sb.length() - 1);
 sb.append("}");
 return sb.toString();
}

代码示例来源:origin: apache/hive

public Object getFieldValue(_Fields field) {
 switch (field) {
 case QUERY_ID:
  return getQueryId();
 case QUERY_TYPE:
  return getQueryType();
 case QUERY_ATTRIBUTES:
  return getQueryAttributes();
 case QUERY_COUNTERS:
  return getQueryCounters();
 case STAGE_GRAPH:
  return getStageGraph();
 case STAGE_LIST:
  return getStageList();
 case DONE:
  return isDone();
 case STARTED:
  return isStarted();
 }
 throw new IllegalStateException();
}

代码示例来源:origin: apache/drill

public Object getFieldValue(_Fields field) {
 switch (field) {
 case QUERY_ID:
  return getQueryId();
 case QUERY_TYPE:
  return getQueryType();
 case QUERY_ATTRIBUTES:
  return getQueryAttributes();
 case QUERY_COUNTERS:
  return getQueryCounters();
 case STAGE_GRAPH:
  return getStageGraph();
 case STAGE_LIST:
  return getStageList();
 case DONE:
  return isDone();
 case STARTED:
  return isStarted();
 }
 throw new IllegalStateException();
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

public Object getFieldValue(_Fields field) {
 switch (field) {
 case QUERY_ID:
  return getQueryId();
 case QUERY_TYPE:
  return getQueryType();
 case QUERY_ATTRIBUTES:
  return getQueryAttributes();
 case QUERY_COUNTERS:
  return getQueryCounters();
 case STAGE_GRAPH:
  return getStageGraph();
 case STAGE_LIST:
  return getStageList();
 case DONE:
  return new Boolean(isDone());
 case STARTED:
  return new Boolean(isStarted());
 }
 throw new IllegalStateException();
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query) {
 StringBuilder sb = new StringBuilder();
 sb.append("{");
 sb.append(getJSONKeyValue("queryId", query.getQueryId()));
 sb.append(getJSONKeyValue("queryType", query.getQueryType()));
 sb.append(getJSONKeyValue("queryAttributes", getJSONMap(query.getQueryAttributes())));
 sb.append(getJSONKeyValue("queryCounters", getJSONMap(query.getQueryCounters())));
 sb.append(getJSONKeyValue("stageGraph", getJSONGraph(query.getStageGraph())));
 // stageList
 List<String> stageList = new ArrayList<String>();
 if (query.getStageList() != null) {
  for (org.apache.hadoop.hive.ql.plan.api.Stage stage : query.getStageList()) {
   stageList.add(getJSONStage(stage));
  }
 }
 sb.append(getJSONKeyValue("stageList", getJSONList(stageList)));
 sb.append(getJSONKeyValue("done", query.isDone()));
 sb.append(getJSONKeyValue("started", query.isStarted()));
 sb.deleteCharAt(sb.length() - 1);
 sb.append("}");
 return sb.toString();
}

代码示例来源:origin: org.apache.hadoop.hive/hive-exec

public String getJSONQuery(org.apache.hadoop.hive.ql.plan.api.Query query) {
 StringBuilder sb = new StringBuilder();
 sb.append("{");
 sb.append(getJSONKeyValue("queryId", query.getQueryId()));
 sb.append(getJSONKeyValue("queryType", query.getQueryType()));
 sb.append(getJSONKeyValue("queryAttributes", getJSONMap(query.getQueryAttributes())));
 sb.append(getJSONKeyValue("queryCounters", getJSONMap(query.getQueryCounters())));
 sb.append(getJSONKeyValue("stageGraph", getJSONGraph(query.getStageGraph())));
 // stageList
 List<String> stageList = new ArrayList<String>();
 if (query.getStageList() != null) {
  for (org.apache.hadoop.hive.ql.plan.api.Stage stage : query.getStageList()) {
   stageList.add(getJSONStage(stage));
  }
 }
 sb.append(getJSONKeyValue("stageList", getJSONList(stageList)));
 sb.append(getJSONKeyValue("done", query.isDone()));
 sb.append(getJSONKeyValue("started", query.isStarted()));
 sb.deleteCharAt(sb.length() - 1);
 sb.append("}");
 return sb.toString();
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

public Object getFieldValue(_Fields field) {
 switch (field) {
 case QUERY_ID:
  return getQueryId();
 case QUERY_TYPE:
  return getQueryType();
 case QUERY_ATTRIBUTES:
  return getQueryAttributes();
 case QUERY_COUNTERS:
  return getQueryCounters();
 case STAGE_GRAPH:
  return getStageGraph();
 case STAGE_LIST:
  return getStageList();
 case DONE:
  return Boolean.valueOf(isDone());
 case STARTED:
  return Boolean.valueOf(isStarted());
 }
 throw new IllegalStateException();
}

相关文章