Package org.teiid.common.buffer

Examples of org.teiid.common.buffer.BufferManager


          rightTuples = temp;
      }
    }
   
    public void helpTestJoinDirect(List[] expectedResults, int batchSize, int processingBytes) throws TeiidComponentException, TeiidProcessingException {
        BufferManager mgr = NodeTestUtil.getTestBufferManager(processingBytes, batchSize);
        CommandContext context = new CommandContext("pid", "test", null, null, 1);               //$NON-NLS-1$ //$NON-NLS-2$
       
        join.addChild(leftNode);
        join.addChild(rightNode);
       
View Full Code Here


      BufferServiceImpl svc = new BufferServiceImpl();
        svc.setDiskDirectory(UnitTestUtil.getTestScratchPath()+"/teiid/1");
        svc.setUseDisk(false);
        svc.start();
       
        BufferManager mgr = svc.getBufferManager();
        assertEquals(16261, mgr.getSchemaSize(schema));
    }
View Full Code Here

    public TestQueryProcessor(String name) {
        super(name);
    }
   
    public void helpTestProcessor(FakeProcessorPlan plan, long timeslice, List[] expectedResults) throws TeiidException {
        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();
View Full Code Here

        helpProcessException(plan, dataManager, null);
    }
   
    private void helpProcessException(ProcessorPlan plan, ProcessorDataManager dataManager, String expectedErrorMessage) {
      TupleBuffer tsId = null;
      BufferManager bufferMgr = null;
        try {  
            bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
            CommandContext context = new CommandContext("0", "test", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$
            QueryProcessor processor = new QueryProcessor(plan, context, bufferMgr, dataManager);
            processor.setNonBlocking(true);
View Full Code Here

          }
        }
    }
       
    public static void doProcess(ProcessorPlan plan, ProcessorDataManager dataManager, List[] expectedResults, CommandContext context) throws Exception {
      BufferManager bufferMgr = context.getBufferManager();
      if (bufferMgr == null) {
          BufferManagerImpl bm = BufferManagerFactory.createBufferManager();
          bm.setProcessorBatchSize(context.getProcessorBatchSize());
          bm.setConnectorBatchSize(context.getProcessorBatchSize());
          context.setBufferManager(bm);
View Full Code Here

        String resultSetName = "xmltest.rs"; //$NON-NLS-1$
       
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        Program program = exampleProgram(metadata, env);
       
        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        XMLPlan temp = new XMLPlan(env);
        CommandContext context = new CommandContext("pid", null, null, null, 1); //$NON-NLS-1$
        temp.initialize(context,null,bufferMgr);

        List schema = new ArrayList();
View Full Code Here

       
        Criteria crit = helpGetCriteria("xmltest.rs.itemName = 'Screwdriver'", metadata)//$NON-NLS-1$
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        Program program = exampleProgram2(crit, metadata, env);
               
        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        XMLPlan temp = new XMLPlan(env);
        CommandContext context = new CommandContext("pid", null, null, null, 1); //$NON-NLS-1$
        temp.initialize(context,null,bufferMgr);
        env.addData(resultSetName, command.getProjectedSymbols(), new List[] {
                    Arrays.asList( new Object[] { "001", "Lamp", new Integer(5) } ),         //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

    BatchIterator bi = new BatchIterator(new FakeRelationalNode(1, new List[] {
      Arrays.asList(1),
      Arrays.asList(1),
      Arrays.asList(1)
    }, 1));
    BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
    bi.setBuffer(bm.createTupleBuffer(Arrays.asList(new ElementSymbol("x")), "test", TupleSourceType.PROCESSOR), true)//$NON-NLS-1$
    bi.mark();
    bi.nextTuple();
    bi.nextTuple();
    bi.reset();
    bi.nextTuple();
View Full Code Here

    BatchIterator bi = new BatchIterator(new FakeRelationalNode(1, new List[] {
      Arrays.asList(1),
      Arrays.asList(2),
      Arrays.asList(3)
    }, 2));
    BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
    TupleBuffer tb = bm.createTupleBuffer(Arrays.asList(new ElementSymbol("x")), "test", TupleSourceType.PROCESSOR);
    bi.setBuffer(tb, true)//$NON-NLS-1$
    bi.nextTuple();
    bi.mark();
    bi.nextTuple();
    bi.reset();
View Full Code Here

  @Test public void testReset2() throws Exception {
    BatchIterator bi = new BatchIterator(new FakeRelationalNode(1, new List[] {
      Arrays.asList(1),
      Arrays.asList(2),
    }, 2));
    BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
    TupleBuffer tb = bm.createTupleBuffer(Arrays.asList(new ElementSymbol("x")), "test", TupleSourceType.PROCESSOR);
    bi.setBuffer(tb, true)//$NON-NLS-1$
    bi.hasNext();
    bi.mark();
    bi.nextTuple();
    bi.nextTuple();
View Full Code Here

TOP

Related Classes of org.teiid.common.buffer.BufferManager

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.