Package org.voltdb.catalog

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


                total_partitionRatio += partition_ratio;
                total_partitionSize += ts.tuple_size_total;
                Column catalog_col = ReplicatedColumn.get(catalog_tbl);
                pentry = new TableEntry(PartitionMethodType.REPLICATION, catalog_col);
                if (debug.val)
                    LOG.debug(String.format("Replicating %s at all partitions [%s]", catalog_tbl.getName(), catalog_col.fullName()));

                // -------------------------------
                // Forced Selection
                // -------------------------------
            } else if (forced_columns.isEmpty() == false) {
View Full Code Here


                Column catalog_col = CollectionUtil.first(forced_columns);
                pentry = new TableEntry(PartitionMethodType.HASH, catalog_col);
                total_partitionRatio += partition_size / (double) hints.max_memory_per_partition;
                total_partitionSize += partition_size;
                if (debug.val)
                    LOG.debug(String.format("Forcing %s to be partitioned by specific column [%s]", catalog_tbl.getName(), catalog_col.fullName()));

                // -------------------------------
                // Select Most Popular
                // -------------------------------
            } else {
View Full Code Here

                            continue;
                        if (catalog_col.getNullable())
                            continue;
                        long cnt = cset_histogram.get(catalog_col);
                        if (trace.val)
                            LOG.trace("Found Match: " + catalog_col.fullName() + " [cnt=" + cnt + "]");
                        column_histogram.put(catalog_col, Math.round(cnt * edge_weight));
                    } // FOR
                    // System.err.println(cset.debug());
                    // LOG.info("[" + e.getTotalWeight() + "]: " + cset);
                } // FOR
View Full Code Here

                // If there is more than one partition, then we'll never be multi-partition
                // so we can stop our search right here.
                if (partitions.size() > 1) {
                    if (trace.val)
                        LOG.trace(String.format("%s references %s's partitioning attribute %s on %d different partitions -- VALUES %s", catalog_proc.getName(), catalog_tbl.getName(),
                                table_partition_col.fullName(), partitions.size(), partitions));
                    txn_entry.singlesited = false;
                    break;

                // Make sure that the partitioning ProcParameter hashes to the same
                // site as the value used on the partitioning column for this table
View Full Code Here

                pentry = new TableEntry(PartitionMethodType.HASH, catalog_col, null, null);
                total_partitionRatio += partition_size / (double) hints.max_memory_per_partition;
                total_partitionSize += partition_size;

                if (debug.val)
                    LOG.debug(String.format("Selected %s's most popular column for partitioning [%s]", catalog_tbl.getName(), catalog_col.fullName()));
            }
            pplan.table_entries.put(catalog_tbl, pentry);

            if (debug.val)
                LOG.debug(String.format("Current Partition Size: %s", StringUtil.formatSize(total_partitionSize), StringUtil.formatSize(hints.max_memory_per_partition)));
View Full Code Here

            if (pplan.getTableEntry(catalog_tbl) == null) {
                Column catalog_col = CollectionUtil.random(catalog_tbl.getColumns());
                assert (catalog_col != null) : "Failed to randomly pick column for " + catalog_tbl;
                pplan.table_entries.put(catalog_tbl, new TableEntry(PartitionMethodType.HASH, catalog_col, null, null));
                if (debug.val)
                    LOG.debug(String.format("No partitioning column selected for %s. Choosing a random attribute [%s]", catalog_tbl, catalog_col.fullName()));
            }
        } // FOR

        if (hints.enable_procparameter_search) {
            if (debug.val)
View Full Code Here

                        Column from_column = columns.get(col_code_idx);
                        assert(from_column != null);
                        Column to_column = columns.get(code_2_id.get(col_code_idx));
                        assert(to_column != null) : String.format("Invalid column %s.%s", tableName, code_2_id.get(col_code_idx))
                        long id = (Long)tuple[code_2_id.get(col_code_idx)];
                        if (trace.val) LOG.trace(String.format("Mapping %s '%s' -> %s '%d'", from_column.fullName(), code, to_column.fullName(), id));
                        this.profile.code_id_xref.get(to_column.getName()).put(code, id);
                    }
                } // FOR
               
                // Foreign Key Code -> Foreign Key Id
View Full Code Here

                // Foreign Key Code -> Foreign Key Id
                for (int col_code_idx : mapping_columns.keySet()) {
                    Column catalog_col = columns.get(col_code_idx);
                    assert(tuple[col_code_idx] != null || catalog_col.getNullable()) :
                        String.format("The code %s column at '%d' is null for %s id=%s\n%s",
                        catalog_col.fullName(), col_code_idx, tableName, tuple[0], Arrays.toString(tuple));
                    if (tuple[col_code_idx] != null) {
                        String code = tuple[col_code_idx].toString();
                        tuple[col_code_idx] = mapping_columns.get(col_code_idx).get(code);
                        if (trace.val) {
                            Column catalog_fkey_col = CatalogUtil.getForeignKeyParent(catalog_col);
View Full Code Here

                        String code = tuple[col_code_idx].toString();
                        tuple[col_code_idx] = mapping_columns.get(col_code_idx).get(code);
                        if (trace.val) {
                            Column catalog_fkey_col = CatalogUtil.getForeignKeyParent(catalog_col);
                            LOG.trace(String.format("Mapped %s '%s' -> %s '%s'",
                                      catalog_col.fullName(), code, catalog_fkey_col.fullName(), tuple[col_code_idx]));
                        }
                    }
                } // FOR
               
                vt.addRow(tuple);
View Full Code Here

            virtual_col.setIndex(catalog_col.getIndex());
            virtual_col.setNullable(catalog_col.getNullable());
            virtual_col.setSize(catalog_col.getSize());
            virtual_col.setType(catalog_col.getType());
            if (debug.val)
                LOG.debug(String.format("Added VerticalPartition column %s", virtual_col.fullName()));
           
            // If they want an index, then we'll make one based on every column except for the column
            // that the table is partitioned on
            if (createIndex) {
                boolean include = true;
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.