Examples of BlockingSendPayment


Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

        dtxnHints.basePartition = BASE_PARTITION;
        LatchableProcedureCallback dtxnCallback = new LatchableProcedureCallback(1);
        this.client.callProcedure(dtxnCallback, this.blockingProc.getName(), dtxnHints, dtxnParams);
       
        // Block until we know that the txn has started running
        BlockingSendPayment voltProc = HStoreSiteTestUtil.getCurrentVoltProcedure(this.executor, BlockingSendPayment.class);
        assertNotNull(voltProc);
        boolean result = voltProc.NOTIFY_BEFORE.tryAcquire(HStoreSiteTestUtil.NOTIFY_TIMEOUT, TimeUnit.MILLISECONDS);
        assertTrue(result);
       
        // Ok now we're going to release our txn. It will execute a bunch of stuff.
View Full Code Here

Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

     */
    @Test
    public void testCaching() throws Exception {
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, this.client);
       
        BlockingSendPayment voltProc = this.startTxn();
        Long txnId = voltProc.getTransactionId();
        assertNotNull(txnId);
        LocalTransaction ts = hstore_site.getTransaction(txnId);
        assertNotNull(ts);
       
        Set<String> expectedTables = new HashSet<String>();
View Full Code Here

Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

     */
    @Test
    public void testReadSets() throws Exception {
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, this.client);
       
        BlockingSendPayment voltProc = this.startTxn();
        Long txnId = voltProc.getTransactionId();
        assertNotNull(txnId);
        LocalTransaction ts = hstore_site.getTransaction(txnId);
        assertNotNull(ts);
       
        Set<String> expectedTables = new HashSet<String>();
View Full Code Here

Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

     */
    @Test
    public void testWriteSets() throws Exception {
        TestSmallBankSuite.initializeSmallBankDatabase(catalogContext, this.client);
       
        BlockingSendPayment voltProc = this.startTxn();
        Long txnId = voltProc.getTransactionId();
        assertNotNull(txnId);
        LocalTransaction ts = hstore_site.getTransaction(txnId);
        assertNotNull(ts);
       
        Set<String> expectedTables = new HashSet<String>();
View Full Code Here

Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

        dtxnHints.basePartition = BASE_PARTITION;
        LatchableProcedureCallback dtxnCallback = new LatchableProcedureCallback(1);
        this.client.callProcedure(dtxnCallback, this.blockingProc.getName(), dtxnHints, dtxnParams);
       
        // Block until we know that the txn has started running
        BlockingSendPayment dtxnVoltProc = HStoreSiteTestUtil.getCurrentVoltProcedure(this.baseExecutor, BlockingSendPayment.class);
        assertNotNull(dtxnVoltProc);
        boolean result = dtxnVoltProc.NOTIFY_BEFORE.tryAcquire(HStoreSiteTestUtil.NOTIFY_TIMEOUT, TimeUnit.MILLISECONDS);
        assertTrue(result);
        this.checkCurrentDtxn();
       
View Full Code Here

Examples of org.voltdb.regressionsuites.specexecprocs.BlockingSendPayment

        dtxnHints.basePartition = BASE_PARTITION;
        LatchableProcedureCallback dtxnCallback = new LatchableProcedureCallback(1);
        this.client.callProcedure(dtxnCallback, this.blockingProc.getName(), dtxnHints, dtxnParams);
       
        // Block until we know that the txn has started running
        BlockingSendPayment dtxnVoltProc = HStoreSiteTestUtil.getCurrentVoltProcedure(this.baseExecutor, BlockingSendPayment.class);
        assertNotNull(dtxnVoltProc);
        boolean result = dtxnVoltProc.NOTIFY_BEFORE.tryAcquire(HStoreSiteTestUtil.NOTIFY_TIMEOUT, TimeUnit.MILLISECONDS);
        assertTrue(result);
        this.checkCurrentDtxn();
       
        // Fire off a single-partition txn that will not get executed right away
        // We have to use the blocking version because there needs to be data in tables first
        Object spParams[] = new Object[]{ BASE_PARTITION+1, BASE_PARTITION+1, 1.0 };
        StoredProcedureInvocationHints spHints = new StoredProcedureInvocationHints();
        spHints.basePartition = BASE_PARTITION+1;
        LatchableProcedureCallback spCallback0 = new LatchableProcedureCallback(1);
        this.client.callProcedure(spCallback0, this.nonblockingProc.getName(), spHints, spParams);
        HStoreSiteTestUtil.checkQueuedTxns(this.remoteExecutor, 1);
       
        // Ok now we're going to release our txn. It will execute a bunch of stuff.
        // It should be able to identify that it is finished with the remote partition without
        // having to be explicitly told in the code.
        dtxnVoltProc.LOCK_BEFORE.release();
        result = dtxnVoltProc.NOTIFY_AFTER.tryAcquire(HStoreSiteTestUtil.NOTIFY_TIMEOUT, TimeUnit.MILLISECONDS);
        assertTrue(result);
       
        LocalTransaction dtxn = (LocalTransaction)this.baseExecutor.getDebugContext().getCurrentDtxn();
        assertEquals(dtxnVoltProc.getTransactionId(), dtxn.getTransactionId());
//        EstimatorState t_state = dtxn.getEstimatorState();
//        if (t_state instanceof MarkovEstimatorState) {
//            LOG.warn("WROTE MARKOVGRAPH: " + ((MarkovEstimatorState)t_state).dumpMarkovGraph());
//        }
        PartitionSet donePartitions = dtxn.getDonePartitions();
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.