Examples of BufferManager


Examples of org.teiid.common.buffer.BufferManager

        node.setMode(mode);
        node.setModelName("myModel"); //$NON-NLS-1$
       
        CommandContext context = new CommandContext();
        context.setProcessorID("processorID"); //$NON-NLS-1$
        BufferManager bm = NodeTestUtil.getTestBufferManager(tupleBatchSize, tupleBatchSize);
        ProcessorDataManager dataManager = new FakePDM(tupleBatchSize);
       
        child.initialize(context, bm, dataManager);
        node.initialize(context, bm, dataManager);
        node.open();
View Full Code Here

Examples of org.teiid.common.buffer.BufferManager

    hdm = new HardcodedDataManager();
    hdm.addData("SELECT matsrc.x FROM matsrc", new List[] {Arrays.asList((String)null), Arrays.asList("one"), Arrays.asList("two"), Arrays.asList("three")});
    hdm.addData("SELECT mattable.info.e1, mattable.info.e2 FROM mattable.info", new List[] {Arrays.asList("a", 1), Arrays.asList("a", 2)});
    hdm.addData("SELECT mattable.info.e2, mattable.info.e1 FROM mattable.info", new List[] {Arrays.asList(1, "a"), Arrays.asList(2, "a")});
   
      BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
      SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
      cache.setBufferManager(bm);
      Executor executor = new Executor() {
      @Override
      public void execute(Runnable command) {
View Full Code Here

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

Examples of org.teiid.common.buffer.BufferManager

      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

Examples of org.teiid.common.buffer.BufferManager

    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

Examples of org.teiid.common.buffer.BufferManager

        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

Examples of org.teiid.common.buffer.BufferManager

          }
        }
    }
       
    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

Examples of org.teiid.common.buffer.BufferManager

        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

Examples of org.teiid.common.buffer.BufferManager

       
        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

Examples of org.teiid.common.buffer.BufferManager

    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
TOP
Copyright © 2018 www.massapi.com. 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.