Pass only the execution mode instead of result reader object to the Aql compile method.
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization_result_distribution@1156 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
index 1299bae..06defbd 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/APIServlet.java
@@ -324,7 +324,6 @@
printInHtml(out, query);
ServletContext context = getServletContext();
IHyracksClientConnection hcc;
- ResultReader resultReader;
try {
synchronized (context) {
hcc = (IHyracksClientConnection) context.getAttribute(HYRACKS_CONNECTION_ATTR);
@@ -332,8 +331,6 @@
hcc = new HyracksConnection(strIP, port);
context.setAttribute(HYRACKS_CONNECTION_ATTR, hcc);
}
- resultReader = new ResultReader(hcc, out);
- new Thread(resultReader).start();
}
AQLParser parser = new AQLParser(query);
List<Statement> aqlStatements = parser.Statement();
@@ -345,7 +342,7 @@
List<QueryResult> executionResults = null;
double duration = 0;
long startTime = System.currentTimeMillis();
- executionResults = aqlTranslator.compileAndExecute(hcc, resultReader);
+ executionResults = aqlTranslator.compileAndExecute(hcc, false);
long endTime = System.currentTimeMillis();
duration = (endTime - startTime) / 1000.00;
out.println("<PRE>Duration of all jobs: " + duration + "</PRE>");