diff --git a/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java b/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java index 90a3595c74d..f2b715a18f4 100644 --- a/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java +++ b/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java @@ -154,7 +154,6 @@ public class AsyncQueryForwardingServlet extends HttpServlet URI rewrittenURI = rewriteURI(hostFinder.getHost(query), req); - final AsyncContext asyncContext = req.startAsync(); // let proxy http client timeout asyncContext.setTimeout(0); @@ -232,7 +231,7 @@ public class AsyncQueryForwardingServlet extends HttpServlet log.error(logError, "Unable to log query [%s]!", query); } - log.makeAlert(throwable, "Exception handling request [%s]", id) + log.makeAlert(throwable, "Exception handling request [%s]", query.getId()) .addData("query", query) .addData("peer", req.getRemoteAddr()) .emit(); diff --git a/server/src/main/java/io/druid/server/QueryResource.java b/server/src/main/java/io/druid/server/QueryResource.java index 18ba190393f..0d38a33a33c 100644 --- a/server/src/main/java/io/druid/server/QueryResource.java +++ b/server/src/main/java/io/druid/server/QueryResource.java @@ -148,6 +148,16 @@ public class QueryResource ); } + if ((boolean) query.getContextValue("b", false)) { + System.out.println("***NEW QUERY***"); + while (true) { + System.out.println("SLEEPING"); + Thread.sleep(10000); + } + } else if ((boolean) query.getContextValue("a", false)) { + return Response.ok("hi").build(); + } + if (log.isDebugEnabled()) { log.debug("Got query [%s]", query); }