Package edu.brown.hstore.txns

Examples of edu.brown.hstore.txns.LocalTransaction.testInit()


                     catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                     proc,
                     new Object[0]);
       
        LocalTransaction ts1 = new LocalTransaction(this.hstore_site);
        ts1.testInit(NEXT_TXN_ID++,
                     BASE_PARTITION,
                     catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                     proc,
                     new Object[0]);
       
View Full Code Here


    public void testWriteWriteConflicts() throws Exception {
        Procedure proc = this.getProcedure(neworder.class);
        Collection<Table> tables = CatalogUtil.getReferencedTables(proc);
       
        LocalTransaction ts0 = new LocalTransaction(this.hstore_site);
        ts0.testInit(NEXT_TXN_ID++,
                     BASE_PARTITION,
                     catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                     proc,
                     new Object[0]);
       
View Full Code Here

                     catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                     proc,
                     new Object[0]);
       
        LocalTransaction ts1 = new LocalTransaction(this.hstore_site);
        ts1.testInit(NEXT_TXN_ID++,
                     BASE_PARTITION,
                     catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                     proc,
                     new Object[0]);
       
View Full Code Here

        assertFalse(procList.isEmpty());
       
        LocalTransaction ts = null, tsWithoutEstimatorState = null;
        for (Procedure proc: procList) {
            ts = new LocalTransaction(this.hstore_site);
            ts.testInit(this.idManager.getNextUniqueTransactionId(),
                        BASE_PARTITION,
                        null,
                        catalogContext.getPartitionSetSingleton(BASE_PARTITION),
                        proc);
            if (tsWithoutEstimatorState == null)
View Full Code Here

            }
        } // FOR
        assertNotNull(proc);
       
        LocalTransaction ts = new LocalTransaction(this.hstore_site);
        ts.testInit(this.idManager.getNextUniqueTransactionId(), BASE_PARTITION, null, catalogContext.getPartitionSetSingleton(BASE_PARTITION), proc);
        assertTrue(ts.isPredictSinglePartition());
        this.addToQueue(ts);
       
        LocalTransaction next = this.scheduler.next(this.dtxn, SpeculationType.IDLE);
        //System.err.println(this.dtxn.debug());
View Full Code Here

        Collection<Table> conflictTables = ConflictSetUtil.getAllTables(cs.getWritewriteconflicts());
        assertFalse(conflictTables.isEmpty());
       
        // First time we should be able to get through
        LocalTransaction ts = new LocalTransaction(this.hstore_site);
        ts.testInit(this.idManager.getNextUniqueTransactionId(), BASE_PARTITION, null, catalogContext.getPartitionSetSingleton(BASE_PARTITION), proc);
        assertTrue(ts.isPredictSinglePartition());
        this.addToQueue(ts);
        LocalTransaction next = this.scheduler.next(this.dtxn, SpeculationType.SP2_REMOTE_AFTER);
        assertNotNull(next);
        assertEquals(ts, next);
View Full Code Here

        assertNotNull(cs);
        Collection<Table> conflictTables = ConflictSetUtil.getAllTables(cs.getReadwriteconflicts());
        assertFalse(conflictTables.isEmpty());
       
        LocalTransaction ts = new LocalTransaction(this.hstore_site);
        ts.testInit(this.idManager.getNextUniqueTransactionId(), BASE_PARTITION, null, catalogContext.getPartitionSetSingleton(BASE_PARTITION), proc);
        assertTrue(ts.isPredictSinglePartition());
        this.addToQueue(ts);
       
        LocalTransaction next = this.scheduler.next(this.dtxn, SpeculationType.SP2_REMOTE_BEFORE);
        assertNotNull(next);
View Full Code Here

        int num_txns = 1000;
        long txnId[] = new long[num_txns];
        for (int i = 0; i < num_txns; i++) {
            LocalTransaction ts = new LocalTransaction(hstore_site);
            txnId[i] = TXN_ID.incrementAndGet();
            ts.testInit(txnId[i],
                        BASE_PARTITION,
                        new PartitionSet(BASE_PARTITION),
                        catalog_procs[i % 2],
                        TARGET_PARAMS[i % 2]);
           
View Full Code Here

            public MockCallback getInitCallback() {
                return (callback);
            }
        };
        Procedure catalog_proc = this.getProcedure(TARGET_PROCEDURE);
        ts.testInit(txn_id, 0, partitions, catalog_proc);
        callback.init(ts, partitions);
        this.txns.put(txn_id, ts);
        return (ts);
    }
   
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.