Package org.teiid.dqp.internal.process
Class DQPCore
- java.lang.Object
-
- org.teiid.dqp.internal.process.DQPCore
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDQPCore.CompletionListener<T>static interfaceDQPCore.ResultsListener
-
Constructor Summary
Constructors Constructor Description DQPCore()
-
Method Summary
-
-
-
Method Detail
-
stop
public void stop()
perform a full shutdown and wait for 10 seconds for all threads to finish
-
getRequestsForSession
public List<RequestMetadata> getRequestsForSession(String sessionId)
Return a list ofRequestMetadatafor the given session
-
getClientState
public org.teiid.dqp.internal.process.ClientState getClientState(String key, boolean create)
-
getRequests
public List<RequestMetadata> getRequests()
Return a list of allRequestMetadata
-
getLongRunningRequests
public List<RequestMetadata> getLongRunningRequests()
-
getLongRunningRequestCount
public int getLongRunningRequestCount()
-
executeRequest
public ResultsFuture<ResultsMessage> executeRequest(long reqID, RequestMessage requestMsg) throws TeiidProcessingException
- Specified by:
executeRequestin interfaceDQP- Throws:
TeiidProcessingException
-
executeRequest
public ResultsFuture<ResultsMessage> executeRequest(long reqID, RequestMessage requestMsg, Long queryTimeout) throws TeiidProcessingException
- Throws:
TeiidProcessingException
-
processCursorRequest
public ResultsFuture<ResultsMessage> processCursorRequest(long reqID, int batchFirst, int fetchSize) throws TeiidProcessingException
- Specified by:
processCursorRequestin interfaceDQP- Throws:
TeiidProcessingException
-
getActivePlanCount
public int getActivePlanCount()
-
getTotalPlansProcessed
public long getTotalPlansProcessed()
-
blockOnOutputBuffer
public boolean blockOnOutputBuffer(RequestWorkItem item)
-
getWaitingPlanCount
public int getWaitingPlanCount()
-
getMaxWaitingPlanWatermark
public int getMaxWaitingPlanWatermark()
-
closeLobChunkStream
public ResultsFuture<?> closeLobChunkStream(int lobRequestId, long requestId, String streamId) throws TeiidProcessingException
- Specified by:
closeLobChunkStreamin interfaceDQP- Throws:
TeiidProcessingException
-
requestNextLobChunk
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId, long requestId, String streamId) throws TeiidProcessingException
- Specified by:
requestNextLobChunkin interfaceDQP- Throws:
TeiidProcessingException
-
getWorkerPoolStatistics
public WorkerPoolStatisticsMetadata getWorkerPoolStatistics()
-
getProcessWorkerPool
public TeiidExecutor getProcessWorkerPool()
-
terminateSession
public void terminateSession(String sessionId)
-
cancelRequest
public boolean cancelRequest(String sessionId, long executionId) throws TeiidComponentException
- Throws:
TeiidComponentException
-
closeRequest
public ResultsFuture<?> closeRequest(long requestId) throws TeiidProcessingException, TeiidComponentException
- Specified by:
closeRequestin interfaceDQP- Throws:
TeiidProcessingExceptionTeiidComponentException
-
getTransactions
public Collection<TransactionMetadata> getTransactions()
-
terminateTransaction
public void terminateTransaction(String xid) throws AdminException
- Throws:
AdminException
-
getDataTierManager
public TempTableDataManager getDataTierManager()
-
getBufferManager
public BufferManager getBufferManager()
-
getTransactionService
public TransactionService getTransactionService()
-
getResltSetCache
public SessionAwareCache<CachedResults> getResltSetCache()
-
start
public void start(DQPConfiguration theConfig)
-
setBufferManager
public void setBufferManager(BufferManager mgr)
-
setTransactionService
public void setTransactionService(TransactionService service)
-
setEventDistributor
public void setEventDistributor(EventDistributor eventDistributor)
-
cancelRequest
public boolean cancelRequest(long requestID) throws TeiidProcessingException, TeiidComponentException- Specified by:
cancelRequestin interfaceDQP- Throws:
TeiidProcessingExceptionTeiidComponentException
-
begin
public ResultsFuture<?> begin() throws XATransactionException
- Specified by:
beginin interfaceDQP- Throws:
XATransactionException
-
commit
public ResultsFuture<?> commit() throws XATransactionException
- Specified by:
commitin interfaceDQP- Throws:
XATransactionException
-
rollback
public ResultsFuture<?> rollback() throws XATransactionException
- Specified by:
rollbackin interfaceDQP- Throws:
XATransactionException
-
commit
public ResultsFuture<?> commit(XidImpl xid, boolean onePhase) throws XATransactionException
- Specified by:
commitin interfaceDQP- Throws:
XATransactionException
-
end
public ResultsFuture<?> end(XidImpl xid, int flags) throws XATransactionException
- Specified by:
endin interfaceDQP- Throws:
XATransactionException
-
forget
public ResultsFuture<?> forget(XidImpl xid) throws XATransactionException
- Specified by:
forgetin interfaceDQP- Throws:
XATransactionException
-
prepare
public ResultsFuture<Integer> prepare(XidImpl xid) throws XATransactionException
- Specified by:
preparein interfaceDQP- Throws:
XATransactionException
-
recover
public ResultsFuture<Xid[]> recover(int flag) throws XATransactionException
- Specified by:
recoverin interfaceDQP- Throws:
XATransactionException
-
rollback
public ResultsFuture<?> rollback(XidImpl xid) throws XATransactionException
- Specified by:
rollbackin interfaceDQP- Throws:
XATransactionException
-
start
public ResultsFuture<?> start(XidImpl xid, int flags, int timeout) throws XATransactionException
- Specified by:
startin interfaceDQP- Throws:
XATransactionException
-
getMetadata
public MetadataResult getMetadata(long requestID) throws TeiidComponentException, TeiidProcessingException
- Specified by:
getMetadatain interfaceDQP- Throws:
TeiidComponentExceptionTeiidProcessingException
-
getMetadata
public MetadataResult getMetadata(long requestID, String preparedSql, boolean allowDoubleQuotedVariable) throws TeiidComponentException, TeiidProcessingException
- Specified by:
getMetadatain interfaceDQP- Throws:
TeiidComponentExceptionTeiidProcessingException
-
isExceptionOnMaxSourceRows
public boolean isExceptionOnMaxSourceRows()
-
getMaxSourceRows
public int getMaxSourceRows()
-
getMaxRowsFetchSize
public int getMaxRowsFetchSize()
-
setResultsetCache
public void setResultsetCache(SessionAwareCache<CachedResults> cache)
-
setPreparedPlanCache
public void setPreparedPlanCache(SessionAwareCache<PreparedPlan> cache)
-
getUserRequestSourceConcurrency
public int getUserRequestSourceConcurrency()
-
getMaxActivePlans
public int getMaxActivePlans()
-
getPrepPlanCache
public SessionAwareCache<PreparedPlan> getPrepPlanCache()
-
getRuntimeVersion
public String getRuntimeVersion()
-
executeQuery
public static ResultsFuture<?> executeQuery(Object command, VDBMetaData vdb, String user, String app, long timeoutInMilli, DQPCore engine, DQPCore.ResultsListener listener) throws Throwable
Execute the given query asynchly. Has a hard limit of only returning max rows fetch size rows.- Parameters:
command-vdb-user-app-timeoutInMilli-engine-listener-- Returns:
- Throws:
Throwable
-
setLocalProfile
public void setLocalProfile(LocalProfile localProfile)
The localprofile to use if this is an embedded DQP- Parameters:
localProfile-
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getSessionService
public SessionService getSessionService()
-
-