@ThreadSafe public class QueryStateMachine extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryStateMachine.QueryOutputManager |
public static QueryStateMachine begin(String query, Session session, URI self, ResourceGroupId resourceGroup, boolean transactionControl, TransactionManager transactionManager, AccessControl accessControl, Executor executor, Metadata metadata, WarningCollector warningCollector)
public QueryId getQueryId()
public Session getSession()
public long getPeakUserMemoryInBytes()
public long getPeakRevocableMemoryInBytes()
public long getPeakTotalMemoryInBytes()
public long getPeakTaskUserMemory()
public long getPeakTaskRevocableMemory()
public long getPeakTaskTotalMemory()
public WarningCollector getWarningCollector()
public void updateMemoryUsage(long deltaUserMemoryInBytes,
long deltaRevocableMemoryInBytes,
long deltaTotalMemoryInBytes,
long taskUserMemoryInBytes,
long taskRevocableMemoryInBytes,
long taskTotalMemoryInBytes)
public BasicQueryInfo getBasicQueryInfo(Optional<BasicStageStats> rootStage)
public VersionedMemoryPoolId getMemoryPool()
public void setMemoryPool(VersionedMemoryPoolId memoryPool)
public void addOutputInfoListener(Consumer<QueryExecution.QueryOutputInfo> listener)
public void updateOutputLocations(Set<URI> newExchangeLocations, boolean noMoreExchangeLocations)
public void setSetCatalog(String catalog)
public void setSetSchema(String schema)
public void setSetPath(String path)
public String getSetPath()
public void addSetRole(String catalog, SelectedRole role)
public void addResetSessionProperties(String name)
public void removePreparedStatement(String key)
public void setStartedTransactionId(TransactionId startedTransactionId)
public void clearTransactionId()
public void setUpdateType(String updateType)
public QueryState getQueryState()
public boolean isDone()
public boolean transitionToWaitingForResources()
public boolean transitionToDispatching()
public boolean transitionToPlanning()
public boolean transitionToStarting()
public boolean transitionToRunning()
public boolean transitionToFinishing()
public boolean transitionToFailed(Throwable throwable)
public boolean transitionToCanceled()
public void addStateChangeListener(StateMachine.StateChangeListener<QueryState> stateChangeListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.public void addQueryInfoStateChangeListener(StateMachine.StateChangeListener<QueryInfo> stateChangeListener)
this when adding a listener in a constructor.public com.google.common.util.concurrent.ListenableFuture<QueryState> getStateChange(QueryState currentState)
public void recordHeartbeat()
public void beginAnalysis()
public void endAnalysis()
public void beginDistributedPlanning()
public void endDistributedPlanning()
public org.joda.time.DateTime getCreateTime()
public Optional<org.joda.time.DateTime> getExecutionStartTime()
public org.joda.time.DateTime getLastHeartbeat()
public Optional<org.joda.time.DateTime> getEndTime()
public Optional<ExecutionFailureInfo> getFailureInfo()
public void pruneQueryInfo()
Copyright © 2012–2019. All rights reserved.