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 interface
DQPCore.CompletionListener<T>
static interface
DQPCore.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 ofRequestMetadata
for 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:
executeRequest
in 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:
processCursorRequest
in 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:
closeLobChunkStream
in interfaceDQP
- Throws:
TeiidProcessingException
-
requestNextLobChunk
public ResultsFuture<LobChunk> requestNextLobChunk(int lobRequestId, long requestId, String streamId) throws TeiidProcessingException
- Specified by:
requestNextLobChunk
in 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:
closeRequest
in interfaceDQP
- Throws:
TeiidProcessingException
TeiidComponentException
-
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:
cancelRequest
in interfaceDQP
- Throws:
TeiidProcessingException
TeiidComponentException
-
begin
public ResultsFuture<?> begin() throws XATransactionException
- Specified by:
begin
in interfaceDQP
- Throws:
XATransactionException
-
commit
public ResultsFuture<?> commit() throws XATransactionException
- Specified by:
commit
in interfaceDQP
- Throws:
XATransactionException
-
rollback
public ResultsFuture<?> rollback() throws XATransactionException
- Specified by:
rollback
in interfaceDQP
- Throws:
XATransactionException
-
commit
public ResultsFuture<?> commit(XidImpl xid, boolean onePhase) throws XATransactionException
- Specified by:
commit
in interfaceDQP
- Throws:
XATransactionException
-
end
public ResultsFuture<?> end(XidImpl xid, int flags) throws XATransactionException
- Specified by:
end
in interfaceDQP
- Throws:
XATransactionException
-
forget
public ResultsFuture<?> forget(XidImpl xid) throws XATransactionException
- Specified by:
forget
in interfaceDQP
- Throws:
XATransactionException
-
prepare
public ResultsFuture<Integer> prepare(XidImpl xid) throws XATransactionException
- Specified by:
prepare
in interfaceDQP
- Throws:
XATransactionException
-
recover
public ResultsFuture<Xid[]> recover(int flag) throws XATransactionException
- Specified by:
recover
in interfaceDQP
- Throws:
XATransactionException
-
rollback
public ResultsFuture<?> rollback(XidImpl xid) throws XATransactionException
- Specified by:
rollback
in interfaceDQP
- Throws:
XATransactionException
-
start
public ResultsFuture<?> start(XidImpl xid, int flags, int timeout) throws XATransactionException
- Specified by:
start
in interfaceDQP
- Throws:
XATransactionException
-
getMetadata
public MetadataResult getMetadata(long requestID) throws TeiidComponentException, TeiidProcessingException
- Specified by:
getMetadata
in interfaceDQP
- Throws:
TeiidComponentException
TeiidProcessingException
-
getMetadata
public MetadataResult getMetadata(long requestID, String preparedSql, boolean allowDoubleQuotedVariable) throws TeiidComponentException, TeiidProcessingException
- Specified by:
getMetadata
in interfaceDQP
- Throws:
TeiidComponentException
TeiidProcessingException
-
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()
-
-