Package org.voltdb.catalog

Examples of org.voltdb.catalog.Statement.fullName()


                Statement statement = (Statement) vertex.getCatalogItem();
                if (statement.getPrefetchable()) {
                    if (debug.val)
                        LOG.debug(String.format("%s - Checking whether we can prefetch %s on partitions %s",
                                 TransactionUtil.formatTxnName(catalog_proc, txn_id),
                                 statement.fullName(), vertex.getPartitions()));
                    if (vertex.getPartitions().isEmpty() == false && vertex.getPartitions().get() != base_partition) {
                        state.addPrefetchableStatement(vertex.getCountedStatement());
                    }
                }
            } // FOR
View Full Code Here


                    LOG.error("CURRENT: " + element + " [commit=" + element.isCommitVertex() + "]");
                    LOG.error("NEXT: " + next + " [commit=" + next.isCommitVertex() + "]");
                }
                assert(next_catalog_stmt_index > cur_catalog_stmt_index) :
                    String.format("%s[#%d] > %s[#%d]",
                                  next_catalog_stmt.fullName(), next_catalog_stmt_index,
                                  cur_catalog_stmt.fullName(), cur_catalog_stmt_index);
            }
           
            // Check whether it's COMMIT/ABORT
            if (next.isCommitVertex() || next.isAbortVertex()) {
View Full Code Here

                stmt_args_offsets = new int[stmt_args.length];
                for (int i = 0; i < stmt_args.length; i++)
                    stmt_args_offsets[i] = i;
            }
            assert(stmt_args_offsets != null) :
                "Unexpected null StmtParameter offsets for " + catalog_stmt.fullName();
            for (int offset : stmt_args_offsets) {
                StmtParameter catalog_stmt_param = stmt_params[offset];
                assert(catalog_stmt_param != null);
                if (trace.val)
                    LOG.trace("Retrieving ParameterMappings for " + catalog_stmt_param.fullName());
View Full Code Here

                            LOG.trace("Invalid candidate transition:\n" + StringUtil.formatMaps(m));
                        }
                    } // FOR (Vertex
                    if (trace.val && candidate_edge == null)
                        LOG.trace(String.format("Failed to find candidate edge from %s to %s [partitions=%s]",
                                  element, catalog_stmt.fullName(), this.stmt_partitions));
                }
            }
            // Without any stmt_args, there's nothing we can do here...
            else if (trace.val) {
                LOG.trace("No stmt_args for " + catalog_stmt + ". Skipping...");
View Full Code Here

     */
    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);
        assertFalse(cols.isEmpty());
        // System.err.println(stmt.fullName() + " -> " + cols + "\n" + StringUtil.formatMaps(cache.colParams));
       
View Full Code Here

        // So we should be able to see that conflict
        StatementCache cache = this.checker.stmtCache.get(stmt0);
        assertNotNull(stmt0.fullName(), cache);
       
        ConflictPair cp = cache.conflicts.get(stmt1);
        assertNotNull(stmt0.fullName()+"->"+stmt1.fullName(), cp);
        assertTrue(cp.getAlwaysconflicting());
    }
   
    /**
     * testCanExecuteNonConflicting
 
View Full Code Here

        // BATCH PLANNER
        sb.append("\nPLANNER\n");
        for (int i = 0; i < planner.getBatchSize(); i++) {
            Statement stmt0 = planner.getStatements()[i];
            Statement stmt1 = batchStmts[i].getStatement();
            assert(stmt0.fullName().equals(stmt1.fullName())) :
                stmt0.fullName() + " != " + stmt1.fullName();
            sb.append(String.format("[%02d] %s\n     %s\n", i, stmt0.fullName(), stmt1.fullName()));
        } // FOR
       
        // PARAMETERS
View Full Code Here

        sb.append("\nPLANNER\n");
        for (int i = 0; i < planner.getBatchSize(); i++) {
            Statement stmt0 = planner.getStatements()[i];
            Statement stmt1 = batchStmts[i].getStatement();
            assert(stmt0.fullName().equals(stmt1.fullName())) :
                stmt0.fullName() + " != " + stmt1.fullName();
            sb.append(String.format("[%02d] %s\n     %s\n", i, stmt0.fullName(), stmt1.fullName()));
        } // FOR
       
        // PARAMETERS
        sb.append("\nBATCH PARAMETERS\n");
View Full Code Here

        for (int i = 0; i < planner.getBatchSize(); i++) {
            Statement stmt0 = planner.getStatements()[i];
            Statement stmt1 = batchStmts[i].getStatement();
            assert(stmt0.fullName().equals(stmt1.fullName())) :
                stmt0.fullName() + " != " + stmt1.fullName();
            sb.append(String.format("[%02d] %s\n     %s\n", i, stmt0.fullName(), stmt1.fullName()));
        } // FOR
       
        // PARAMETERS
        sb.append("\nBATCH PARAMETERS\n");
        ParameterMangler pm = ParameterMangler.singleton(ts.getProcedure());
View Full Code Here

                String.format("The Statement at index %d is null for %s",
                              stmt_index, this.catalog_proc);
            final Object params[] = batchArgs[stmt_index].toArray();
            if (trace.val)
                LOG.trace(String.format("[#%d-%02d] Calculating touched partitions plans for %s",
                          txn_id, stmt_index, catalog_stmt.fullName()));

            Map<PlanFragment, PartitionSet> frag_partitions = plan.frag_partitions[stmt_index];
            PartitionSet stmt_all_partitions = plan.stmt_partitions[stmt_index];

            boolean has_singlepartition_plan = catalog_stmt.getHas_singlesited();
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.