private CellGrouper(CFMetaData metadata, SerializationHelper helper, boolean isStatic) { this.metadata = metadata; this.isStatic = isStatic; this.helper = helper; // We cannot use a sorted builder because we don't have exactly the same ordering in 3.0 and pre-3.0. More precisely, within a row, we // store all simple columns before the complex ones in 3.0, which we use to sort everything sorted by the column name before. Note however // that the unsorted builder won't have to reconcile cells, so the exact value we pass for nowInSec doesn't matter. this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); }
private CellGrouper(CFMetaData metadata, SerializationHelper helper, boolean isStatic) { this.metadata = metadata; this.isStatic = isStatic; this.helper = helper; // We cannot use a sorted builder because we don't have exactly the same ordering in 3.0 and pre-3.0. More precisely, within a row, we // store all simple columns before the complex ones in 3.0, which we use to sort everything sorted by the column name before. Note however // that the unsorted builder won't have to reconcile cells, so the exact value we pass for nowInSec doesn't matter. this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); }
private CellGrouper(CFMetaData metadata, SerializationHelper helper, boolean isStatic) { this.metadata = metadata; this.isStatic = isStatic; this.helper = helper; // We cannot use a sorted builder because we don't have exactly the same ordering in 3.0 and pre-3.0. More precisely, within a row, we // store all simple columns before the complex ones in 3.0, which we use to sort everything sorted by the column name before. Note however // that the unsorted builder won't have to reconcile cells, so the exact value we pass for nowInSec doesn't matter. this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); }
private CellGrouper(CFMetaData metadata, SerializationHelper helper, boolean isStatic) { this.metadata = metadata; this.isStatic = isStatic; this.helper = helper; // We cannot use a sorted builder because we don't have exactly the same ordering in 3.0 and pre-3.0. More precisely, within a row, we // store all simple columns before the complex ones in 3.0, which we use to sort everything sorted by the column name before. Note however // that the unsorted builder won't have to reconcile cells, so the exact value we pass for nowInSec doesn't matter. this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
public RowBuilder(CFMetaData metadata, Object... clusteringColumns) { this.metadata = metadata; this.builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); this.builder.newRow(makeClustering(metadata, clusteringColumns)); }
public void newRow(Clustering clustering) throws InvalidRequestException { if (metadata.isDense() && !metadata.isCompound()) { // If it's a COMPACT STORAGE table with a single clustering column, the clustering value is // translated in Thrift to the full Thrift column name, and for backward compatibility we // don't want to allow that to be empty (even though this would be fine for the storage engine). assert clustering.size() == 1; ByteBuffer value = clustering.get(0); if (value == null || !value.hasRemaining()) throw new InvalidRequestException("Invalid empty or null value for column " + metadata.clusteringColumns().get(0).name); } if (clustering == Clustering.STATIC_CLUSTERING) { if (staticBuilder == null) staticBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = staticBuilder; } else { if (regularBuilder == null) regularBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = regularBuilder; } builder.newRow(clustering); }
public void newRow(Clustering clustering) throws InvalidRequestException { if (metadata.isDense() && !metadata.isCompound()) { // If it's a COMPACT STORAGE table with a single clustering column, the clustering value is // translated in Thrift to the full Thrift column name, and for backward compatibility we // don't want to allow that to be empty (even though this would be fine for the storage engine). assert clustering.size() == 1; ByteBuffer value = clustering.get(0); if (value == null || !value.hasRemaining()) throw new InvalidRequestException("Invalid empty or null value for column " + metadata.clusteringColumns().get(0).name); } if (clustering == Clustering.STATIC_CLUSTERING) { if (staticBuilder == null) staticBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = staticBuilder; } else { if (regularBuilder == null) regularBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = regularBuilder; } builder.newRow(clustering); }
public void newRow(Clustering clustering) throws InvalidRequestException { if (metadata.isDense() && !metadata.isCompound()) { // If it's a COMPACT STORAGE table with a single clustering column, the clustering value is // translated in Thrift to the full Thrift column name, and for backward compatibility we // don't want to allow that to be empty (even though this would be fine for the storage engine). assert clustering.size() == 1; ByteBuffer value = clustering.get(0); if (value == null || !value.hasRemaining()) throw new InvalidRequestException("Invalid empty or null value for column " + metadata.clusteringColumns().get(0).name); } if (clustering == Clustering.STATIC_CLUSTERING) { if (staticBuilder == null) staticBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = staticBuilder; } else { if (regularBuilder == null) regularBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = regularBuilder; } builder.newRow(clustering); }
public void newRow(Clustering clustering) throws InvalidRequestException { if (metadata.isDense() && !metadata.isCompound()) { // If it's a COMPACT STORAGE table with a single clustering column, the clustering value is // translated in Thrift to the full Thrift column name, and for backward compatibility we // don't want to allow that to be empty (even though this would be fine for the storage engine). assert clustering.size() == 1; ByteBuffer value = clustering.get(0); if (value == null || !value.hasRemaining()) throw new InvalidRequestException("Invalid empty or null value for column " + metadata.clusteringColumns().get(0).name); } if (clustering == Clustering.STATIC_CLUSTERING) { if (staticBuilder == null) staticBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = staticBuilder; } else { if (regularBuilder == null) regularBuilder = BTreeRow.unsortedBuilder(nowInSec); builder = regularBuilder; } builder.newRow(clustering); }
columnsToFetch.add(column.name.bytes); Row.Builder builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); builder.newRow(Clustering.STATIC_CLUSTERING);
columnsToFetch.add(column.name.bytes); Row.Builder builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); builder.newRow(Clustering.STATIC_CLUSTERING);
columnsToFetch.add(column.name.bytes); Row.Builder builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); builder.newRow(Clustering.STATIC_CLUSTERING);
columnsToFetch.add(column.name.bytes); Row.Builder builder = BTreeRow.unsortedBuilder(FBUtilities.nowInSeconds()); builder.newRow(Clustering.STATIC_CLUSTERING);