本文整理了Java中io.druid.query.Query.getId
方法的一些代码示例,展示了Query.getId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.getId
方法的具体详情如下:
包路径:io.druid.query.Query
类名称:Query
方法名:getId
暂无
代码示例来源:origin: io.druid/druid-processing
@Override
public void queryId(QueryType query)
{
setDimension(DruidMetrics.ID, Strings.nullToEmpty(query.getId()));
}
代码示例来源:origin: io.druid/druid-server
@Override
public void exceptionCaught(final ClientResponse<InputStream> clientResponse, final Throwable e)
{
String msg = StringUtils.format(
"Query[%s] url[%s] failed with exception msg [%s]",
query.getId(),
url,
e.getMessage()
);
setupResponseReadFailure(msg, e);
}
代码示例来源:origin: io.druid/druid-server
private long checkQueryTimeout()
{
long timeLeft = timeoutAt - System.currentTimeMillis();
if (timeLeft <= 0) {
String msg = StringUtils.format("Query[%s] url[%s] timed out.", query.getId(), url);
setupResponseReadFailure(msg, null);
throw new RE(msg);
} else {
return timeLeft;
}
}
代码示例来源:origin: io.druid/druid-server
private void checkTotalBytesLimit(long bytes)
{
if (maxScatterGatherBytes < Long.MAX_VALUE && totalBytesGathered.addAndGet(bytes) > maxScatterGatherBytes) {
String msg = StringUtils.format(
"Query[%s] url[%s] max scatter-gather bytes limit reached.",
query.getId(),
url
);
setupResponseReadFailure(msg, null);
throw new RE(msg);
}
}
};
代码示例来源:origin: io.druid/druid-server
/**
* Initializes this object to execute a specific query. Does not actually execute the query.
*
* @param baseQuery the query
*/
@SuppressWarnings("unchecked")
public void initialize(final Query baseQuery)
{
transition(State.NEW, State.INITIALIZED);
String queryId = baseQuery.getId();
if (Strings.isNullOrEmpty(queryId)) {
queryId = UUID.randomUUID().toString();
}
this.queryPlus = QueryPlus.wrap(baseQuery.withId(queryId));
this.toolChest = warehouse.getToolChest(baseQuery);
}
代码示例来源:origin: com.n3twork.druid/druid-processing
String queryId = query.getId();
if (queryId == null) {
queryId = "";
代码示例来源:origin: io.druid/druid-server
log.debug(
"Completed queryId[%s] request to url[%s] with %,d bytes returned in %,d millis [%,f b/s].",
query.getId(),
url,
byteCount.get(),
代码示例来源:origin: io.druid/druid-server
@Override
public void registerQuery(Query query, final ListenableFuture future)
{
final String id = query.getId();
final List<String> datasources = query.getDataSource().getNames();
queries.put(id, future);
queryDatasources.putAll(id, datasources);
future.addListener(
new Runnable()
{
@Override
public void run()
{
queries.remove(id, future);
for (String datasource : datasources) {
queryDatasources.remove(id, datasource);
}
}
},
MoreExecutors.sameThreadExecutor()
);
}
代码示例来源:origin: io.druid/druid-server
try {
final Query query = requestLogLine.getQuery();
MDC.put("queryId", query.getId());
MDC.put("dataSource", query.getDataSource().toString());
MDC.put("queryType", query.getType());
代码示例来源:origin: com.n3twork.druid/druid-server
requestQuery = ByteStreams.toByteArray(req.getInputStream());
query = objectMapper.readValue(requestQuery, Query.class);
queryId = query.getId();
if (queryId == null) {
queryId = UUID.randomUUID().toString();
代码示例来源:origin: io.druid/druid-server
log.warn("Tried to emit logs and metrics twice for query[%s]!", queryPlus.getQuery().getId());
log.warn(e, "Exception while processing queryId [%s]", queryPlus.getQuery().getId());
statsMap.put("interrupted", true);
statsMap.put("reason", e.toString());
代码示例来源:origin: io.druid/druid-server
if (inputQuery != null) {
targetServer = hostFinder.pickServer(inputQuery);
if (inputQuery.getId() == null) {
inputQuery = inputQuery.withId(UUID.randomUUID().toString());
代码示例来源:origin: com.n3twork.druid/druid-server
queryId = query.getId();
if (queryId == null) {
queryId = UUID.randomUUID().toString();
代码示例来源:origin: io.druid/druid-server
queryLifecycle.initialize(readQuery(req, in, context));
query = queryLifecycle.getQuery();
final String queryId = query.getId();
代码示例来源:origin: io.druid/druid-server
checkTotalBytesLimit(response.getContent().readableBytes());
log.debug("Initial response from url[%s] for queryId[%s]", url, query.getId());
responseStartTimeNs = System.nanoTime();
acquireResponseMetrics().reportNodeTimeToFirstByte(responseStartTimeNs - requestStartTimeNs).emit(emitter);
代码示例来源:origin: io.druid/druid-server
final String cancelUrl = StringUtils.format("%s://%s/druid/v2/%s", scheme, host, query.getId());
log.debug("Querying queryId[%s] url[%s]", query.getId(), url);
throw new RE("Query[%s] url[%s] timed out.", query.getId(), url);
内容来源于网络,如有侵权,请联系作者删除!