Package org.voltdb.catalog

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


                            // then it has to be a broadcast
                            if (mc_partitions[i].isEmpty()) {
                                if (debug.val)
                                    LOG.warn(String.format("No partitions for %s from %s. " +
                                         "Cache entry %s must be broadcast to all partitions",
                                         mc_column.fullName(), mc.fullName(), target));
                                table_partitions.addAll(this.all_partitions);
                                is_valid = false;
                                break;
                            }
                            if (trace.val)
View Full Code Here


                    }

                    // We should always have a horizontal partition column
                    assert (current_col != null);
                    current_tbl.setPartitioncolumn(current_col);
                    assert (current_col.getName().equals(current_tbl.getPartitioncolumn().getName())) : "Unexpected " + current_col.fullName() + " != " + current_tbl.getPartitioncolumn().fullName();

                    // Estimate memory size
                    Collection<Table> tablesToEstimate = null;
                    if (hints.enable_vertical_partitioning && this.current_vertical_partitions.isEmpty() == false) {
                        tablesToEstimate = CollectionUtils.union(current_previousTables, this.current_vertical_partitions);
View Full Code Here

                        tablesToEstimate = CollectionUtils.union(current_previousTables, this.current_vertical_partitions);
                    } else {
                        tablesToEstimate = current_previousTables;
                    }
                    if (trace.val)
                        LOG.trace(String.format("Calculating memory size of current solution [%s]:\n%s", current_col.fullName(), StringUtil.join("\n", current_previousTables)));
                    try {
                        memory = this.memory_estimator.estimate(info.catalogContext.database, info.getNumPartitions(), tablesToEstimate);
                    } catch (Throwable ex) {
                        throw new RuntimeException("Failed to estimate memory using new attribute " + current_col.fullName(), ex);
                    }
View Full Code Here

                    if (trace.val)
                        LOG.trace(String.format("Calculating memory size of current solution [%s]:\n%s", current_col.fullName(), StringUtil.join("\n", current_previousTables)));
                    try {
                        memory = this.memory_estimator.estimate(info.catalogContext.database, info.getNumPartitions(), tablesToEstimate);
                    } catch (Throwable ex) {
                        throw new RuntimeException("Failed to estimate memory using new attribute " + current_col.fullName(), ex);
                    }
                    memory_exceeded = (memory > this.hints.max_memory_per_partition);
                    if (trace.val)
                        LOG.trace(String.format("%s Memory: %s [ratio=%.2f, exceeded=%s]", current_col.fullName(), StringUtil.formatSize(memory), memory / (double) hints.max_memory_per_partition,
                                memory_exceeded));
View Full Code Here

                    } catch (Throwable ex) {
                        throw new RuntimeException("Failed to estimate memory using new attribute " + current_col.fullName(), ex);
                    }
                    memory_exceeded = (memory > this.hints.max_memory_per_partition);
                    if (trace.val)
                        LOG.trace(String.format("%s Memory: %s [ratio=%.2f, exceeded=%s]", current_col.fullName(), StringUtil.formatSize(memory), memory / (double) hints.max_memory_per_partition,
                                memory_exceeded));
                    current_attribute = current_col;

                    // ----------------------------------------------
                    // PROCEDURE PARTITIONING PARAMETER
View Full Code Here

                else if (types[col_idx] == VoltType.STRING) {
                    // Clip columns that are larger than our limit
                    int limit = catalog_col.getSize();
                    if (row[row_idx].length() > limit) {
                        if (!truncate_warnings.contains(catalog_col)) {
                            LOG.warn("Line " + TableDataIterable.this.line_ctr + ": Truncating data for " + catalog_col.fullName() + " because size " + row[row_idx].length() + " > " + limit);
                            truncate_warnings.add(catalog_col);
                        }
                        row[row_idx] = row[row_idx].substring(0, limit);
                    }
                    tuple[col_idx] = row[row_idx++];
View Full Code Here

                    pentry = new TableEntry(PartitionMethodType.HASH, col, null, null);
                }
                assert (pentry.attribute != null) : catalog_tbl;
            }
            if (debug.val)
                LOG.debug(String.format("[%02d] %s", pplan.getTableCount(), col.fullName()));
            pplan.getTableEntries().put(catalog_tbl, pentry);
        } // FOR
        assert (total_memory_used <= 100) : "Too much memory per partition: " + total_memory_used;

        if (hints.enable_procparameter_search) {
View Full Code Here

                if (catalog_col == null)
                    LOG.fatal("Failed to find column for " + catalog_tbl + " in ColumnSet:\n" + cset);

                if (catalog_col.getNullable()) {
                    if (debug.val)
                        LOG.warn("Ignoring nullable horizontal partition column candidate " + catalog_col.fullName());
                } else {
                    // Always add the base column without any vertical
                    // partitioning
                    candidates.add(catalog_col);
View Full Code Here

                        if (vp_candidates == null) {
                            try {
                                vp_candidates = VerticalPartitionerUtil.generateCandidates(catalog_col, info.stats);
                                col_vps.put(catalog_col, vp_candidates);
                            } catch (Throwable ex) {
                                LOG.warn("Failed to generate vertical partition candidates for " + catalog_col.fullName(), ex);
                            }
                        }
                        if (vp_candidates != null)
                            candidates.addAll(vp_candidates);
                    }
View Full Code Here

            // (3) At least one of the vertical partition's columns is in
            // predicate_cols
            if (debug.val) {
                Map<String, Object> m = new LinkedHashMap<String, Object>();
                m.put("VerticalP", catalog_view.getName());
                m.put("Partitioning Col", partitioning_col.fullName());
                m.put("Output Cols", output_cols);
                m.put("Statement Cols", stmt_cols);
                m.put("VerticalP Cols", view_cols);
                LOG.debug(String.format("Checking whether %s can use vertical partition for %s\n%s", catalog_stmt.fullName(), catalog_tbl.getName(), StringUtil.formatMaps(m)));
            }
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.