当前位置: 首页>>代码示例>>Java>>正文


Java IndexHelper.skipBloomFilter方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:20,代码来源:SimpleSliceReader.java

示例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);
    }
}
 
开发者ID:devdattakulkarni,项目名称:Cassandra-KVPM,代码行数:21,代码来源:IndexedSliceReader.java

示例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());
    }
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:44,代码来源:SimpleSliceReader.java

示例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());
    }
}
 
开发者ID:dprguiuc,项目名称:Cassandra-Wasef,代码行数:56,代码来源:IndexedSliceReader.java


注:本文中的org.apache.cassandra.io.sstable.IndexHelper.skipBloomFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。