From 82d623ada7f4f9bed7548467ea88bcd76b647191 Mon Sep 17 00:00:00 2001 From: fjy Date: Fri, 25 Jul 2014 16:35:55 -0700 Subject: [PATCH] fix compilation error --- .../io/druid/server/AsyncQueryForwardingServlet.java | 3 +-- .../src/main/java/io/druid/server/QueryResource.java | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) 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); }