本文整理汇总了Java中org.apache.cassandra.io.sstable.IndexHelper.skipIndex方法的典型用法代码示例。如果您正苦于以下问题:Java IndexHelper.skipIndex方法的具体用法?Java IndexHelper.skipIndex怎么用?Java IndexHelper.skipIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.io.sstable.IndexHelper
的用法示例。
在下文中一共展示了IndexHelper.skipIndex方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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());
}
}