public class QueryProcessor extends Object implements BatchCollector.BatchProducer
Modifier and Type | Class and Description |
---|---|
static class |
QueryProcessor.ExpiredTimeSliceException |
static interface |
QueryProcessor.ProcessorFactory |
Constructor and Description |
---|
QueryProcessor(ProcessorPlan plan,
CommandContext context,
BufferManager bufferMgr,
ProcessorDataManager dataMgr)
Construct a processor with all necessary information to process.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeProcessing()
Close processing and clean everything up.
|
BatchCollector |
createBatchCollector() |
List<Exception> |
getAndClearWarnings() |
TupleBuffer |
getBuffer(int maxRows)
return the final tuple buffer or null if not available
|
BufferManager |
getBufferManager() |
CommandContext |
getContext() |
List |
getOutputElements()
Get list of resolved elements describing output columns for this plan.
|
ProcessorDataManager |
getProcessorDataManager() |
ProcessorPlan |
getProcessorPlan() |
boolean |
hasBuffer() |
void |
init() |
TupleBatch |
nextBatch()
Get a batch of results or possibly an Exception.
|
void |
requestCanceled()
Asynch shutdown of the QueryProcessor, which may trigger exceptions in the processing thread
|
void |
setContinuous(PreparedPlan prepPlan,
String query) |
void |
setNonBlocking(boolean nonBlocking) |
public QueryProcessor(ProcessorPlan plan, CommandContext context, BufferManager bufferMgr, ProcessorDataManager dataMgr)
plan
- The plan to processcontext
- The context that this plan is being processed in.
Should be cloned from the parent to properly scope the tuplebuffer cachebufferMgr
- The buffer manager that provides access to tuple sourcesdataMgr
- The data manager that provides access to get dataTeiidComponentException
public CommandContext getContext()
public ProcessorPlan getProcessorPlan()
public TupleBatch nextBatch() throws BlockedException, TeiidProcessingException, TeiidComponentException
BatchCollector.BatchProducer
nextBatch
in interface BatchCollector.BatchProducer
BlockedException
- indicating next batch is not available yetTeiidProcessingException
- for business rule exception, related
to user input or modelingTeiidComponentException
- for non-business rule exceptionpublic void init() throws TeiidComponentException, TeiidProcessingException
public void closeProcessing()
public List getOutputElements()
BatchCollector.BatchProducer
getOutputElements
in interface BatchCollector.BatchProducer
public void requestCanceled()
public BatchCollector createBatchCollector() throws TeiidComponentException
TeiidComponentException
public void setNonBlocking(boolean nonBlocking)
public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException
BatchCollector.BatchProducer
getBuffer
in interface BatchCollector.BatchProducer
BlockedException
TeiidComponentException
TeiidProcessingException
public boolean hasBuffer()
hasBuffer
in interface BatchCollector.BatchProducer
public BufferManager getBufferManager()
public void setContinuous(PreparedPlan prepPlan, String query)
public void close() throws TeiidComponentException
close
in interface BatchCollector.BatchProducer
TeiidComponentException
public ProcessorDataManager getProcessorDataManager()
Copyright © 2019. All rights reserved.