Package org.teiid.query.processor

Examples of org.teiid.query.processor.BatchCollector$BatchProducer


        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        CommandContext context = new CommandContext("pID", null, null, null, 1);                                 //$NON-NLS-1$
        QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataMgr);
        processor.setNonBlocking(true);
        BatchCollector collector = processor.createBatchCollector();
        TeiidComponentException failOnDefaultException = null;
        try{
            collector.collectTuples();
        } catch (TeiidComponentException e){
            failOnDefaultException = e;
        }
       
        assertNotNull("Query processing should have failed on default of choice node.", failOnDefaultException); //$NON-NLS-1$
View Full Code Here


        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        FakeDataManager dataManager = new FakeDataManager();

        CommandContext context = new CommandContext("pid", "group", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$
        QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataManager);
        BatchCollector collector = processor.createBatchCollector();
        TupleBuffer tsID = null;
        while(true) {
            try {
                tsID = collector.collectTuples();        
                break;
            } catch(BlockedException e) {
            }
        }
       
View Full Code Here

    proc.setOption(option);
    Determinism determinismLevel = context.resetDeterminismLevel();
    QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(proc.toString(), fullName.toUpperCase(), context);
    qp.setNonBlocking(true);
    qp.getContext().setDataObjects(null);
    BatchCollector bc = qp.createBatchCollector();
    TupleBuffer tb = bc.collectTuples();
    CachedResults cr = new CachedResults();
    cr.setResults(tb, qp.getProcessorPlan());
    cr.setHint(hint);
    if (hint != null && hint.getDeterminism() != null) {
      LogManager.logTrace(LogConstants.CTX_DQP, new Object[] { "Cache hint modified the query determinism from ",determinismLevel, " to ", hint.getDeterminism() }); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

        QueryProcessor qp = context.getQueryProcessorFactory().createQueryProcessor(transformation, fullName, context);
        qp.setNonBlocking(true);
        qp.getContext().setDataObjects(null);
        if (distributedCache != null) {
          CachedResults cr = new CachedResults();
          BatchCollector bc = qp.createBatchCollector();
          TupleBuffer tb = bc.collectTuples();
          cr.setResults(tb, qp.getProcessorPlan());
          touchTable(context, fullName, true);
          this.distributedCache.put(cid, Determinism.VDB_DETERMINISTIC, cr, info.getTtl());
          ts = tb.createIndexedTupleSource();
        } else {
View Full Code Here

          this.cid = cacheId;
          //turn on the collection of data objects used
          request.processor.getContext().setDataObjects(new HashSet<Object>(4));
        }
    processor = request.processor;
    collector = new BatchCollector(processor, processor.getBufferManager(), this.request.context, isForwardOnly()) {
      protected void flushBatchDirect(TupleBatch batch, boolean add) throws TeiidComponentException,TeiidProcessingException {
        resultsBuffer = getTupleBuffer();
        boolean added = false;
        if (cid != null) {
          super.flushBatchDirect(batch, add);
View Full Code Here

        if (this.buffer == null) {
          if (this.iterator instanceof BatchIterator) {
            throw new AssertionError("cannot buffer the source"); //$NON-NLS-1$
          }
          if (collector == null) {
                collector = new BatchCollector(source, source.getBufferManager(), source.getContext(), false);
            }
            this.buffer = collector.collectTuples();
        }
        return this.buffer;
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.BatchCollector$BatchProducer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.