diff --git a/presto-main/src/main/java/com/facebook/presto/server/protocol/QueuedStatementResource.java b/presto-main/src/main/java/com/facebook/presto/server/protocol/QueuedStatementResource.java index fcd5927e4a35..94916c0fe22d 100644 --- a/presto-main/src/main/java/com/facebook/presto/server/protocol/QueuedStatementResource.java +++ b/presto-main/src/main/java/com/facebook/presto/server/protocol/QueuedStatementResource.java @@ -175,7 +175,7 @@ public Response postStatement( } SessionContext sessionContext = new HttpRequestSessionContext(servletRequest, sqlParserOptions); - Query query = new Query(statement, sessionContext, dispatchManager, queryResultsProvider, timeoutExecutor); + Query query = new Query(statement, sessionContext, dispatchManager, queryResultsProvider); queries.put(query.getQueryId(), query); return withCompressionConfiguration(Response.ok(query.getInitialQueryResults(uriInfo, xForwardedProto)), compressionEnabled).build(); @@ -309,7 +309,6 @@ private static final class Query private final SessionContext sessionContext; private final DispatchManager dispatchManager; private final LocalQueryProvider queryProvider; - private final ScheduledExecutorService timeoutExecutor; private final QueryId queryId; private final String slug = "x" + randomUUID().toString().toLowerCase(ENGLISH).replace("-", ""); private final AtomicLong lastToken = new AtomicLong(); @@ -317,13 +316,12 @@ private static final class Query @GuardedBy("this") private ListenableFuture querySubmissionFuture; - public Query(String query, SessionContext sessionContext, DispatchManager dispatchManager, LocalQueryProvider queryResultsProvider, ScheduledExecutorService timeoutExecutor) + public Query(String query, SessionContext sessionContext, DispatchManager dispatchManager, LocalQueryProvider queryResultsProvider) { this.query = requireNonNull(query, "query is null"); this.sessionContext = requireNonNull(sessionContext, "sessionContext is null"); this.dispatchManager = requireNonNull(dispatchManager, "dispatchManager is null"); this.queryProvider = requireNonNull(queryResultsProvider, "queryExecutor is null"); - this.timeoutExecutor = requireNonNull(timeoutExecutor, "timeoutExecutor is null"); this.queryId = dispatchManager.createQueryId(); }