Package org.voltdb.catalog

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


                (this.force_singlePartition)) {
                if (trace.val) {
                    if (this.cache_isSinglePartition[stmt_index]) {
                        LOG.trace(String.format("[#%d-%02d] Using fast-lookup for %s. " +
                              "Skipping PartitionEstimator",
                                  txn_id, stmt_index, catalog_stmt.fullName()));
                    } else {
                        LOG.trace(String.format("[#%d-%02d] %s is read-only and replicate-only." +
                              "Skipping PartitionEstimator",
                              txn_id, stmt_index, catalog_stmt.fullName()));
                    }
View Full Code Here


                              "Skipping PartitionEstimator",
                                  txn_id, stmt_index, catalog_stmt.fullName()));
                    } else {
                        LOG.trace(String.format("[#%d-%02d] %s is read-only and replicate-only." +
                              "Skipping PartitionEstimator",
                              txn_id, stmt_index, catalog_stmt.fullName()));
                    }
                }
                assert (has_singlepartition_plan);

                if (this.cache_singlePartitionFragmentPartitions == null) {
View Full Code Here

            // Otherwise figure out whether the query can execute as
            // single-partitioned or not
            else {
                if (debug.val)
                    LOG.debug(String.format("[#%d-%02d] Computing touched partitions %s in txn #%d", txn_id,
                              stmt_index, catalog_stmt.fullName(), txn_id));

                if (plan.stmt_partitions_swap[stmt_index] != null) {
                    stmt_all_partitions = plan.stmt_partitions[stmt_index] = plan.stmt_partitions_swap[stmt_index];
                    plan.stmt_partitions_swap[stmt_index] = null;
                    stmt_all_partitions.clear();
View Full Code Here

                    } // WHILE
                    // Bad Mojo!
                } catch (Exception ex) {
                    String msg = "";
                    for (int i = 0; i < this.batchSize; i++) {
                        msg += String.format("[#%d-%02d] %s %s\n%5s\n", txn_id, i, catalog_stmt.fullName(),
                                catalog_stmt.getSqltext(), Arrays.toString(batchArgs[i].toArray()));
                    } // FOR
                    LOG.fatal("\n" + msg);
                    throw new RuntimeException("Unexpected error when planning " + catalog_stmt.fullName(), ex);
                }
View Full Code Here

                    for (int i = 0; i < this.batchSize; i++) {
                        msg += String.format("[#%d-%02d] %s %s\n%5s\n", txn_id, i, catalog_stmt.fullName(),
                                catalog_stmt.getSqltext(), Arrays.toString(batchArgs[i].toArray()));
                    } // FOR
                    LOG.fatal("\n" + msg);
                    throw new RuntimeException("Unexpected error when planning " + catalog_stmt.fullName(), ex);
                }
            }
            if (debug.val)
                LOG.debug(String.format("[#%d-%02d] is_singlepartition=%s, partitions=%s",
                          txn_id, stmt_index, is_singlePartition, stmt_all_partitions));
View Full Code Here

                    maps[ii] = m;
                } // FOR

                Map<String, Object> header = new LinkedHashMap<String, Object>();
                header.put("Batch Statement", String.format("#%d / %d", stmt_index, this.batchSize));
                header.put("Catalog Statement", catalog_stmt.fullName());
                header.put("Statement SQL", catalog_stmt.getSqltext());
                header.put("All Partitions", plan.stmt_partitions[stmt_index]);
                header.put("Local Partition", base_partition);
                header.put("IsSingledPartitioned", is_singlePartition);
                header.put("IsStmtLocal", is_local);
View Full Code Here

        // Update the weights for the direct query-to-edge mappings
        for (QueryTrace query : xact.getQueries()) {
            Statement catalog_stmt = query.getCatalogItem(this.info.catalogContext.database);
            if (!this.stmt_edge_xref.containsKey(catalog_stmt)) {
                if (d)
                    LOG.warn("Missing query '" + catalog_stmt.fullName() + "' in Statement-Edge Xref mapping");
            } else {
                for (DesignerEdge edge : this.stmt_edge_xref.get(catalog_stmt)) {
                    edge.addToWeight(time, 1d);
                } // FOR
            }
View Full Code Here

                        vc.applyUpdate();

                    catalog_stmt = catalog_proc.getStatements().get(stmtName);
                    AbstractPlanNode root = PlanNodeUtil.getRootPlanNodeForStatement(catalog_stmt, false);
                    if (debug)
                        LOG.debug(catalog_stmt.fullName() + "\n" + PlanNodeUtil.debug(root));
                    clearCache = true;
                }
            } // FOR
            if (clearCache) {
                CatalogUtil.clearCache(catalog_db);
View Full Code Here

       
        Collection<Column> columns = PlanNodeUtil.getOutputColumnsForPlanNode(catalog_db, root.getChild(0));
        assertNotNull(columns);
//        System.err.print(catalog_stmt.fullName() + ": " + CatalogUtil.debug(columns));
//        System.err.println(PlanNodeUtil.debug(root));
        assertEquals(catalog_stmt.fullName(), expected.length, columns.size());
        for (int i = 0; i < expected.length; i++) {
            assert(columns.contains(expected[i])) : "Missing column " + CatalogUtil.getDisplayName(expected[i]);
        } // FOR

    }
View Full Code Here

       
        Collection<Column> columns = PlanNodeUtil.getUpdatedColumnsForPlanNode(catalog_db, idx_node);
        assertNotNull(columns);
//        System.err.print(catalog_stmt.fullName() + ": " + CatalogUtil.debug(columns));
//        System.err.println(PlanNodeUtil.debug(root));
        assertEquals(catalog_stmt.fullName(), expected.length, columns.size());
        for (int i = 0; i < expected.length; i++) {
            assert(columns.contains(expected[i])) : "Missing column " + CatalogUtil.getDisplayName(expected[i]);
        } // FOR
    }
   
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.