From b09517319d5aa07d56161b9c5936328625dd9230 Mon Sep 17 00:00:00 2001 From: fjy Date: Tue, 29 Jul 2014 13:23:12 -0700 Subject: [PATCH] remove debug code --- .../server/AsyncQueryForwardingServlet.java | 50 +------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java b/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java index ae379efb1e0..e961cd453fe 100644 --- a/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java +++ b/server/src/main/java/io/druid/server/AsyncQueryForwardingServlet.java @@ -107,7 +107,7 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet String host = hostFinder.getDefaultHost(); Query inputQuery = null; boolean hasContent = request.getContentLength() > 0 || request.getContentType() != null; - boolean isQuery = request.getMethod().equalsIgnoreCase(HttpMethod.POST.asString()); + boolean isQuery = request.getMethod().equals(HttpMethod.POST.asString()); long startTime = System.currentTimeMillis(); // queries only exist for POST @@ -140,20 +140,7 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet } } - final int requestId = getRequestId(request); - URI rewrittenURI = rewriteURI(host, request); - - if (_log.isDebugEnabled()) { - StringBuffer uri = request.getRequestURL(); - if (request.getQueryString() != null) { - uri.append("?").append(request.getQueryString()); - } - if (_log.isDebugEnabled()) { - _log.debug("{} rewriting: {} -> {}", requestId, uri, rewrittenURI); - } - } - if (rewrittenURI == null) { onRewriteFailed(request, response); return; @@ -201,41 +188,6 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet customizeProxyRequest(proxyRequest, request); - if (_log.isDebugEnabled()) { - StringBuilder builder = new StringBuilder(request.getMethod()); - builder.append(" ").append(request.getRequestURI()); - String query = request.getQueryString(); - if (query != null) { - builder.append("?").append(query); - } - builder.append(" ").append(request.getProtocol()).append("\r\n"); - for (Enumeration headerNames = request.getHeaderNames(); headerNames.hasMoreElements(); ) { - String headerName = headerNames.nextElement(); - builder.append(headerName).append(": "); - for (Enumeration headerValues = request.getHeaders(headerName); headerValues.hasMoreElements(); ) { - String headerValue = headerValues.nextElement(); - if (headerValue != null) { - builder.append(headerValue); - } - if (headerValues.hasMoreElements()) { - builder.append(","); - } - } - builder.append("\r\n"); - } - builder.append("\r\n"); - - _log.debug( - "{} proxying to upstream:{}{}{}{}", - requestId, - System.lineSeparator(), - builder, - proxyRequest, - System.lineSeparator(), - proxyRequest.getHeaders().toString().trim() - ); - } - if (isQuery) { proxyRequest.send(newMetricsEmittingProxyResponseListener(request, response, inputQuery, startTime)); } else {