public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { List<ColumnDefinition> cks = baseMetadata.clusteringColumns(); for (int i = 0; i < columnDef.position(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } for (int i = columnDef.position() + 1; i < cks.size(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } return builder; } };
public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { List<ColumnDefinition> cks = baseMetadata.clusteringColumns(); for (int i = 0; i < columnDef.position(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } for (int i = columnDef.position() + 1; i < cks.size(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } return builder; } };
public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { List<ColumnDefinition> cks = baseMetadata.clusteringColumns(); for (int i = 0; i < columnDef.position(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } for (int i = columnDef.position() + 1; i < cks.size(); i++) { ColumnDefinition def = cks.get(i); builder.addClusteringColumn(def.name, def.type); } return builder; } };
.withPartitioner(new LocalPartitioner(indexedValueType)) .addPartitionKey(indexedColumn.name, indexedColumn.type) .addClusteringColumn("partition_key", baseCfsMetadata.partitioner.partitionOrdering());
for (int i = 0; i < header.getClusteringTypes().size(); i++) builder.addClusteringColumn("clustering" + (i > 0 ? i : ""), header.getClusteringTypes().get(i));
builder.addPartitionKey(keyAliases.get(i), keyTypes.get(i)); for (int i = 0; i < columnAliases.size(); i++) builder.addClusteringColumn(columnAliases.get(i), clusteringTypes.get(i)); builder.addClusteringColumn(names.defaultClusteringName(), UTF8Type.instance); builder.addRegularColumn(names.defaultCompactValueName(), hasCounters ? CounterColumnType.instance : BytesType.instance);
for (int i = 0; i < header.getClusteringTypes().size(); i++) builder.addClusteringColumn("clustering" + (i > 0 ? i : ""), header.getClusteringTypes().get(i));
for (int i = 0; i < header.getClusteringTypes().size(); i++) builder.addClusteringColumn("clustering" + (i > 0 ? i : ""), header.getClusteringTypes().get(i));
builder.addPartitionKey(keyAliases.get(i), keyTypes.get(i)); for (int i = 0; i < columnAliases.size(); i++) builder.addClusteringColumn(columnAliases.get(i), clusteringTypes.get(i)); builder.addClusteringColumn(names.defaultClusteringName(), UTF8Type.instance); builder.addRegularColumn(names.defaultCompactValueName(), hasCounters ? CounterColumnType.instance : BytesType.instance);
.withPartitioner(new LocalPartitioner(indexedValueType)) .addPartitionKey(indexedColumn.name, indexedColumn.type) .addClusteringColumn("partition_key", baseCfsMetadata.partitioner.partitionOrdering());
/** * Add the clustering columns for a specific type of index table to the a CFMetaData.Builder (which is being * used to construct the index table's CFMetadata. In the default implementation, the clustering columns of the * index table hold the partition key and clustering columns of the base table. This is overridden in several cases: * * When the indexed value is itself a clustering column, in which case, we only need store the base table's * *other* clustering values in the index - the indexed value being the index table's partition key * * When the indexed value is a collection value, in which case we also need to capture the cell path from the base * table * * In a KEYS index (for thrift/compact storage/static column indexes), where only the base partition key is * held in the index table. * * Called from indexCfsMetadata * @param builder * @param baseMetadata * @param cfDef * @return */ default CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition cfDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); return builder; }
/** * Add the clustering columns for a specific type of index table to the a CFMetaData.Builder (which is being * used to construct the index table's CFMetadata. In the default implementation, the clustering columns of the * index table hold the partition key and clustering columns of the base table. This is overridden in several cases: * * When the indexed value is itself a clustering column, in which case, we only need store the base table's * *other* clustering values in the index - the indexed value being the index table's partition key * * When the indexed value is a collection value, in which case we also need to capture the cell path from the base * table * * In a KEYS index (for thrift/compact storage/static column indexes), where only the base partition key is * held in the index table. * * Called from indexCfsMetadata * @param builder * @param baseMetadata * @param cfDef * @return */ default CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition cfDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); return builder; }
/** * Add the clustering columns for a specific type of index table to the a CFMetaData.Builder (which is being * used to construct the index table's CFMetadata. In the default implementation, the clustering columns of the * index table hold the partition key and clustering columns of the base table. This is overridden in several cases: * * When the indexed value is itself a clustering column, in which case, we only need store the base table's * *other* clustering values in the index - the indexed value being the index table's partition key * * When the indexed value is a collection value, in which case we also need to capture the cell path from the base * table * * In a KEYS index (for thrift/compact storage/static column indexes), where only the base partition key is * held in the index table. * * Called from indexCfsMetadata * @param builder * @param baseMetadata * @param cfDef * @return */ default CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition cfDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); return builder; }
public Builder addClusteringColumn(String name, AbstractType type) { return addClusteringColumn(ColumnIdentifier.getInterned(name, false), type); }
public Builder addClusteringColumn(String name, AbstractType type) { return addClusteringColumn(ColumnIdentifier.getInterned(name, false), type); }
public Builder addClusteringColumn(String name, AbstractType type) { return addClusteringColumn(ColumnIdentifier.getInterned(name, false), type); }
public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); // collection key builder.addClusteringColumn("cell_path", ((CollectionType)columnDef.type).nameComparator()); return builder; } };
public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); // collection key builder.addClusteringColumn("cell_path", ((CollectionType)columnDef.type).nameComparator()); return builder; } };
public Builder addClusteringColumn(String name, AbstractType type) { return addClusteringColumn(ColumnIdentifier.getInterned(name, false), type); }
public CFMetaData.Builder addIndexClusteringColumns(CFMetaData.Builder builder, CFMetaData baseMetadata, ColumnDefinition columnDef) { for (ColumnDefinition def : baseMetadata.clusteringColumns()) builder.addClusteringColumn(def.name, def.type); // collection key builder.addClusteringColumn("cell_path", ((CollectionType)columnDef.type).nameComparator()); return builder; } };