Skip to content

Commit

Permalink
Remove unused timeoutExecutor for queued queries
Browse files Browse the repository at this point in the history
  • Loading branch information
highker committed Apr 23, 2021
1 parent 6a1d1d7 commit 28dcba7
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -309,21 +309,19 @@ 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();

@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();
}

Expand Down

0 comments on commit 28dcba7

Please sign in to comment.