public interface QueryManager
Modifier and Type | Method and Description |
---|---|
void |
addOutputInfoListener(QueryId queryId,
Consumer<QueryExecution.QueryOutputInfo> listener)
Add a listener that fires once the query output locations are known.
|
void |
addStateChangeListener(QueryId queryId,
StateMachine.StateChangeListener<QueryState> listener)
Add a listener that fires each time the query state changes.
|
void |
cancelQuery(QueryId queryId)
Attempts to fail the query due to a user cancellation.
|
void |
cancelStage(StageId stageId)
Attempts to cancel the stage and continue the query.
|
void |
createQuery(QueryExecution execution)
Creates a new query using the specified query execution.
|
void |
failQuery(QueryId queryId,
Throwable cause)
Attempts to fail the query for the specified reason.
|
QueryInfo |
getFullQueryInfo(QueryId queryId) |
List<BasicQueryInfo> |
getQueries() |
BasicQueryInfo |
getQueryInfo(QueryId queryId) |
int |
getQueryRetryCount(QueryId queryId) |
Session |
getQuerySession(QueryId queryId) |
QueryState |
getQueryState(QueryId queryId) |
com.google.common.util.concurrent.ListenableFuture<QueryState> |
getStateChange(QueryId queryId,
QueryState currentState)
Gets a future that completes when the query changes from the specified current state
or immediately if the query is already in a final state.
|
QueryManagerStats |
getStats() |
boolean |
isQuerySlugValid(QueryId queryId,
String slug) |
void |
recordHeartbeat(QueryId queryId)
Updates the client heartbeat time, to prevent the query from be automatically purged.
|
List<BasicQueryInfo> getQueries()
void addOutputInfoListener(QueryId queryId, Consumer<QueryExecution.QueryOutputInfo> listener) throws NoSuchElementException
NoSuchElementException
- if query does not existvoid addStateChangeListener(QueryId queryId, StateMachine.StateChangeListener<QueryState> listener) throws NoSuchElementException
this
when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.NoSuchElementException
- if query does not existcom.google.common.util.concurrent.ListenableFuture<QueryState> getStateChange(QueryId queryId, QueryState currentState)
NoSuchElementException
BasicQueryInfo getQueryInfo(QueryId queryId) throws NoSuchElementException
NoSuchElementException
- if query does not existQueryInfo getFullQueryInfo(QueryId queryId) throws NoSuchElementException
NoSuchElementException
- if query does not existSession getQuerySession(QueryId queryId)
NoSuchElementException
- if query does not existboolean isQuerySlugValid(QueryId queryId, String slug)
NoSuchElementException
- if query does not existint getQueryRetryCount(QueryId queryId)
NoSuchElementException
- if query does not existQueryState getQueryState(QueryId queryId) throws NoSuchElementException
NoSuchElementException
- if query does not existvoid recordHeartbeat(QueryId queryId)
void createQuery(QueryExecution execution)
void failQuery(QueryId queryId, Throwable cause)
void cancelQuery(QueryId queryId)
void cancelStage(StageId stageId)
QueryManagerStats getStats()
Copyright © 2012–2022. All rights reserved.