use of org.teiid.query.tempdata.TempTableStore in project teiid by teiid.
the class Program method reset.
/**
* Resets this program, so it can be run through again.
*/
public void reset(String sessionId) {
counter = 0;
this.tempTables = new TempTableStore(sessionId, TransactionMode.ISOLATE_WRITES);
this.startedTxn = false;
this.trappingExceptions = false;
}
use of org.teiid.query.tempdata.TempTableStore in project teiid by teiid.
the class TestMaterialization method setUp.
@Before
public void setUp() {
// $NON-NLS-1$
tempStore = new TempTableStore("1", TransactionMode.ISOLATE_WRITES);
BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
TransformationMetadata actualMetadata = RealMetadataFactory.exampleMaterializedView();
globalStore = new GlobalTableStoreImpl(bm, actualMetadata.getVdbMetaData(), actualMetadata);
metadata = new TempMetadataAdapter(actualMetadata, tempStore.getMetadataStore());
hdm = new HardcodedDataManager();
hdm.addData("SELECT MatSrc.MatSrc.x FROM MatSrc.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") });
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>("resultset", DefaultCacheFactory.INSTANCE, SessionAwareCache.Type.RESULTSET, 0);
cache.setTupleBufferCache(bm);
dataManager = new TempTableDataManager(hdm, bm, cache);
}
use of org.teiid.query.tempdata.TempTableStore in project teiid by teiid.
the class TempTableTestHarness method setUp.
public void setUp(QueryMetadataInterface qmi, ProcessorDataManager dm, BufferManager bm) {
// $NON-NLS-1$
tempStore = new TempTableStore("1", TransactionMode.ISOLATE_WRITES);
metadata = new TempMetadataAdapter(qmi, tempStore.getMetadataStore());
metadata.setSession(true);
SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>("resultset", DefaultCacheFactory.INSTANCE, SessionAwareCache.Type.RESULTSET, 0);
cache.setTupleBufferCache(bm);
dataManager = new TempTableDataManager(dm, bm, cache);
}
Aggregations