Package org.voltdb.catalog

Examples of org.voltdb.catalog.Procedure


        long evicted = evictResult.getLong("ANTICACHE_TUPLES_EVICTED");
        assertTrue("No tuples were evicted!\n"+evictResult, evicted > 0);
        // System.err.println(VoltTableUtil.format(evictResult));
       
        // Now execute a query that needs to access data from this block
        Procedure proc = this.getProcedure(procName); // Special Single-Stmt Proc
        Object params[] = { 1, 1, 1, expected };
        ClientResponse cresponse = this.client.callProcedure(proc.getName(), params);
        assertEquals(Status.OK, cresponse.getStatus());

        // Make sure that we tracked that we tried to touch evicted data
        assertEquals(1, this.profiler.evictedaccess_history.size());
View Full Code Here


   
    private void validateStmt(String procName, Class<? extends AbstractPlanNode> target) throws Exception {
        // Just make sure that our target query plan contains the proper plan node.
        // This in case somebody changes something and we don't actually
        // execute a query with the expected query plan
        Procedure proc = this.getProcedure(procName);
        Statement stmt = CollectionUtil.first(proc.getStatements());
        assertNotNull(stmt);
       
        AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(stmt, true);
        assertNotNull(root);
        Collection<?> scans = PlanNodeUtil.getPlanNodes(root, target);
View Full Code Here

    /**
     * testNewOrder
     */
    @Test
    public void testNewOrder() throws Exception {
        Procedure catalog_proc = this.getProcedure(neworder.class);
        AbstractHasher hasher = p_estimator.getHasher();
       
        long txn_id = 1000;
        for (short w_id = 1; w_id <= NUM_PARTITIONS; w_id++) {
            short remote_w_id = (short)rng.numberExcluding(1, NUM_PARTITIONS, w_id);
View Full Code Here

     * testNonConflictingReadOnly
     */
    public void testNonConflictingReadOnly() throws Exception {
        // Quickly check that two read-only txns are non-conflicting
        // even without a txn estimate
        Procedure proc = this.getProcedure(slev.class);
        int basePartition = 0;
        PartitionSet partitions = catalogContext.getAllPartitionIds();
       
        LocalTransaction ts0 = new LocalTransaction(this.hstore_site);
        Object params0[] = new Object[]{ 0, 1, 2 };
View Full Code Here

        // Quickly check that two read-only txns are non-conflicting
        // even without a txn estimate
        int basePartition = 0;
        PartitionSet partitions = catalogContext.getAllPartitionIds();

        Procedure proc0 = this.getProcedure(paymentByCustomerId.class);
        LocalTransaction ts0 = new LocalTransaction(this.hstore_site);
        Object params0[] = new Object[]{ 0, 1, 2 };
        ts0.testInit(10000l, basePartition, partitions, proc0, params0);
       
        Procedure proc1 = this.getProcedure(UpdateNewOrder.class);
        LocalTransaction ts1 = new LocalTransaction(this.hstore_site);
        Object params1[] = new Object[]{ 0, 0 };
        ts1.testInit(10001l, basePartition, partitions, proc1, params1);
       
        boolean ret = this.checker.hasConflictBefore(ts0, ts1, basePartition);
View Full Code Here

   
    /**
     * testColumnStmtParameters
     */
    public void testColumnStmtParameters() throws Exception {
        Procedure proc = this.getProcedure(neworder.class);
        Statement stmt = this.getStatement(proc, "getDistrict");
        StatementCache cache = this.checker.stmtCache.get(stmt);
        assertNotNull(stmt.fullName(), cache);
       
        Collection<Column> cols = CatalogUtil.getReferencedColumns(stmt);
View Full Code Here

   
    /**
     * testStatementCache
     */
    public void testStatementCache() throws Exception {
        Procedure proc0 = this.getProcedure(slev.class);
        Statement stmt0 = this.getStatement(proc0, "GetStockCount");
        Procedure proc1 = this.getProcedure(neworder.class);
        Statement stmt1 = this.getStatement(proc1, "createOrderLine");
       
        // STMT0 is going to try to read to a table that STMT1 will write to
        // So we should be able to see that conflict
        StatementCache cache = this.checker.stmtCache.get(stmt0);
View Full Code Here

   
    /**
     * testCanExecuteNonConflicting
     */
    public void testCanExecuteNonConflicting() throws Exception {
        Procedure procs[] = {
            this.getProcedure(neworder.class),
            this.getProcedure(ostatByCustomerId.class),
        };
        Statement startStmts[] = {
            this.getStatement(procs[0], "updateStock"),
View Full Code Here

   
    /**
     * testCanExecuteNonConflictingUniqueIndex
     */
    public void testCanExecuteNonConflictingUniqueIndex() throws Exception {
        Procedure procs[] = {
            this.getProcedure(ostatByCustomerId.class),
            this.getProcedure(neworder.class),
        };
        TransactionTrace traces[] = this.getTransactionTraces(procs, true);
       
View Full Code Here

   
    /**
     * testCanExecuteConflictingUniqueIndex
     */
    public void testCanExecuteConflictingUniqueIndex() throws Exception {
        Procedure procs[] = {
            this.getProcedure(ostatByCustomerId.class),
            this.getProcedure(neworder.class),
        };
        TransactionTrace traces[] = this.getTransactionTraces(procs, false);
       
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.Procedure

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.