org.apache.kylin.common.QueryContextFacade.getAllRunningQueries()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(65)

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

QueryContextFacade.getAllRunningQueries介绍

暂无

代码示例

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

/**
   * @param runningTime in milliseconds
   * @return running queries that have run more than specified time
   */
  public static TreeSet<QueryContext> getLongRunningQueries(long runningTime) {
    SortedSet<QueryContext> allRunningQueries = getAllRunningQueries();
    QueryContext tmpCtx = new QueryContext(runningTime + 1L); // plus 1 to include those contexts in same accumulatedMills but different uuid
    return (TreeSet<QueryContext>) allRunningQueries.headSet(tmpCtx);
  }
}

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

/**
 *
 * @param runTimeMoreThan in seconds
 * @return
 */
@RequestMapping(value = "/query/runningQueries", method = RequestMethod.GET)
@ResponseBody
public TreeSet<QueryContext> getRunningQueries(
    @RequestParam(value = "runTimeMoreThan", required = false, defaultValue = "-1") int runTimeMoreThan) {
  if (runTimeMoreThan == -1) {
    return QueryContextFacade.getAllRunningQueries();
  } else {
    return QueryContextFacade.getLongRunningQueries(runTimeMoreThan * 1000);
  }
}

代码示例来源:origin: org.apache.kylin/kylin-core-common

/**
   * @param runningTime in milliseconds
   * @return running queries that have run more than specified time
   */
  public static TreeSet<QueryContext> getLongRunningQueries(long runningTime) {
    SortedSet<QueryContext> allRunningQueries = getAllRunningQueries();
    QueryContext tmpCtx = new QueryContext(runningTime + 1L); // plus 1 to include those contexts in same accumulatedMills but different uuid
    return (TreeSet<QueryContext>) allRunningQueries.headSet(tmpCtx);
  }
}

相关文章

微信公众号

最新文章

更多