本文整理汇总了Java中org.apache.cassandra.io.sstable.IndexHelper.skipBloomFilter方法的典型用法代码示例。如果您正苦于以下问题:Java IndexHelper.skipBloomFilter方法的具体用法?Java IndexHelper.skipBloomFilter怎么用?Java IndexHelper.skipBloomFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.io.sstable.IndexHelper
的用法示例。
在下文中一共展示了IndexHelper.skipBloomFilter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SimpleSliceReader
import org.apache.cassandra.io.sstable.IndexHelper; //导入方法依赖的package包/类
public SimpleSliceReader(SSTableReader sstable, FileDataInput input, ByteBuffer finishColumn)
{
this.file = input;
this.finishColumn = finishColumn;
comparator = sstable.metadata.comparator;
try
{
IndexHelper.skipBloomFilter(file);
IndexHelper.skipIndex(file);
emptyColumnFamily = ColumnFamily.serializer().deserializeFromSSTableNoColumns(ColumnFamily.create(sstable.metadata), file);
columns = file.readInt();
mark = file.mark();
}
catch (IOException e)
{
throw new IOError(e);
}
}
示例2: IndexedSliceReader
import org.apache.cassandra.io.sstable.IndexHelper; //导入方法依赖的package包/类
public IndexedSliceReader(SSTableReader sstable, FileDataInput input, ByteBuffer startColumn, ByteBuffer finishColumn, boolean reversed)
{
this.file = input;
this.startColumn = startColumn;
this.finishColumn = finishColumn;
this.reversed = reversed;
comparator = sstable.metadata.comparator;
try
{
IndexHelper.skipBloomFilter(file);
indexes = IndexHelper.deserializeIndex(file);
emptyColumnFamily = ColumnFamily.serializer().deserializeFromSSTableNoColumns(ColumnFamily.create(sstable.metadata), file);
fetcher = indexes == null ? new SimpleBlockFetcher() : new IndexedBlockFetcher();
}
catch (IOException e)
{
throw new IOError(e);
}
}
示例3: SimpleSliceReader
import org.apache.cassandra.io.sstable.IndexHelper; //导入方法依赖的package包/类
public SimpleSliceReader(SSTableReader sstable, RowIndexEntry indexEntry, FileDataInput input, ByteBuffer finishColumn)
{
Tracing.trace("Seeking to partition beginning in data file");
this.sstable = sstable;
this.finishColumn = finishColumn;
this.comparator = sstable.metadata.comparator;
try
{
if (input == null)
{
this.file = sstable.getFileDataInput(indexEntry.position);
this.needsClosing = true;
}
else
{
this.file = input;
input.seek(indexEntry.position);
this.needsClosing = false;
}
// Skip key and data size
ByteBufferUtil.skipShortLength(file);
SSTableReader.readRowSize(file, sstable.descriptor);
Descriptor.Version version = sstable.descriptor.version;
if (!version.hasPromotedIndexes)
{
IndexHelper.skipBloomFilter(file);
IndexHelper.skipIndex(file);
}
emptyColumnFamily = ColumnFamily.create(sstable.metadata);
emptyColumnFamily.delete(DeletionTime.serializer.deserialize(file));
atomSerializer = emptyColumnFamily.getOnDiskSerializer();
columns = file.readInt();
mark = file.mark();
}
catch (IOException e)
{
sstable.markSuspect();
throw new CorruptSSTableException(e, sstable.getFilename());
}
}
示例4: IndexedSliceReader
import org.apache.cassandra.io.sstable.IndexHelper; //导入方法依赖的package包/类
/**
* This slice reader assumes that slices are sorted correctly, e.g. that for forward lookup slices are in
* lexicographic order of start elements and that for reverse lookup they are in reverse lexicographic order of
* finish (reverse start) elements. i.e. forward: [a,b],[d,e],[g,h] reverse: [h,g],[e,d],[b,a]. This reader also
* assumes that validation has been performed in terms of intervals (no overlapping intervals).
*/
public IndexedSliceReader(SSTableReader sstable, RowIndexEntry indexEntry, FileDataInput input, ColumnSlice[] slices, boolean reversed)
{
Tracing.trace("Seeking to partition indexed section in data file");
this.sstable = sstable;
this.originalInput = input;
this.reversed = reversed;
this.slices = slices;
this.comparator = sstable.metadata.comparator;
this.rangeTombstonesReversed = reversed ? new ArrayDeque<OnDiskAtom>() : null;
try
{
Descriptor.Version version = sstable.descriptor.version;
if (version.hasPromotedIndexes)
{
this.indexes = indexEntry.columnsIndex();
if (indexes.isEmpty())
{
setToRowStart(sstable, indexEntry, input);
this.emptyColumnFamily = ColumnFamily.create(sstable.metadata);
emptyColumnFamily.delete(DeletionTime.serializer.deserialize(file));
fetcher = new SimpleBlockFetcher();
}
else
{
this.emptyColumnFamily = ColumnFamily.create(sstable.metadata);
emptyColumnFamily.delete(indexEntry.deletionTime());
fetcher = new IndexedBlockFetcher(indexEntry.position);
}
}
else
{
setToRowStart(sstable, indexEntry, input);
IndexHelper.skipBloomFilter(file);
this.indexes = IndexHelper.deserializeIndex(file);
this.emptyColumnFamily = ColumnFamily.create(sstable.metadata);
emptyColumnFamily.delete(DeletionTime.serializer.deserialize(file));
fetcher = indexes.isEmpty()
? new SimpleBlockFetcher()
: new IndexedBlockFetcher(file.getFilePointer() + 4); // We still have the column count to
// skip to get the basePosition
}
}
catch (IOException e)
{
sstable.markSuspect();
throw new CorruptSSTableException(e, file.getPath());
}
}