Search in sources :

Example 1 with IInvertedListBuilder

use of org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder in project asterixdb by apache.

the class OnDiskInvertedIndexFactory method createIndexInstance.

@Override
public IInvertedIndex createIndexInstance(FileReference dictBTreeFile) throws HyracksDataException {
    String invListsFilePath = fileNameMapper.getInvListsFilePath(dictBTreeFile.getFile().getAbsolutePath());
    FileReference invListsFile = ioManager.resolveAbsolutePath(invListsFilePath);
    IInvertedListBuilder invListBuilder = invListBuilderFactory.create();
    return new OnDiskInvertedIndex(bufferCache, fileMapProvider, invListBuilder, invListTypeTraits, invListCmpFactories, tokenTypeTraits, tokenCmpFactories, dictBTreeFile, invListsFile, freePageManagerFactory);
}
Also used : IInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder) FileReference(org.apache.hyracks.api.io.FileReference)

Example 2 with IInvertedListBuilder

use of org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder in project asterixdb by apache.

the class PartitionedOnDiskInvertedIndexFactory method createIndexInstance.

@Override
public IInvertedIndex createIndexInstance(FileReference dictBTreeFile) throws HyracksDataException {
    String invListsFilePath = fileNameMapper.getInvListsFilePath(dictBTreeFile.getFile().getAbsolutePath());
    FileReference invListsFile = ioManager.resolveAbsolutePath(invListsFilePath);
    IInvertedListBuilder invListBuilder = invListBuilderFactory.create();
    return new PartitionedOnDiskInvertedIndex(bufferCache, fileMapProvider, invListBuilder, invListTypeTraits, invListCmpFactories, tokenTypeTraits, tokenCmpFactories, dictBTreeFile, invListsFile, freePageManagerFactory);
}
Also used : IInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder) FileReference(org.apache.hyracks.api.io.FileReference)

Example 3 with IInvertedListBuilder

use of org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder in project asterixdb by apache.

the class OnDiskInvertedIndexLifecycleTest method setup.

@Override
public void setup() throws Exception {
    harness.setUp();
    ITypeTraits[] tokenTypeTraits = new ITypeTraits[] { UTF8StringPointable.TYPE_TRAITS };
    IBinaryComparatorFactory[] tokenCmpFactories = new IBinaryComparatorFactory[] { PointableBinaryComparatorFactory.of(UTF8StringPointable.FACTORY) };
    ITypeTraits[] invListTypeTraits = new ITypeTraits[] { IntegerPointable.TYPE_TRAITS };
    IBinaryComparatorFactory[] invListCmpFactories = new IBinaryComparatorFactory[] { PointableBinaryComparatorFactory.of(IntegerPointable.FACTORY) };
    IInvertedListBuilder invListBuilder = new FixedSizeElementInvertedListBuilder(invListTypeTraits);
    FileReference btreeFile = harness.getIOManager().resolveAbsolutePath(harness.getInvListsFileRef().getFile().getAbsolutePath() + "_btree");
    index = new OnDiskInvertedIndex(harness.getDiskBufferCache(), harness.getDiskFileMapProvider(), invListBuilder, invListTypeTraits, invListCmpFactories, tokenTypeTraits, tokenCmpFactories, harness.getInvListsFileRef(), btreeFile, harness.getMetadataPageManagerFactory());
}
Also used : ITypeTraits(org.apache.hyracks.api.dataflow.value.ITypeTraits) IBinaryComparatorFactory(org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory) IInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder) FileReference(org.apache.hyracks.api.io.FileReference)

Example 4 with IInvertedListBuilder

use of org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder in project asterixdb by apache.

the class InvertedIndexUtils method createOnDiskInvertedIndex.

public static OnDiskInvertedIndex createOnDiskInvertedIndex(IIOManager ioManager, IBufferCache bufferCache, IFileMapProvider fileMapProvider, ITypeTraits[] invListTypeTraits, IBinaryComparatorFactory[] invListCmpFactories, ITypeTraits[] tokenTypeTraits, IBinaryComparatorFactory[] tokenCmpFactories, FileReference invListsFile, IPageManagerFactory pageManagerFactory) throws HyracksDataException {
    IInvertedListBuilder builder = new FixedSizeElementInvertedListBuilder(invListTypeTraits);
    FileReference btreeFile = getBTreeFile(ioManager, invListsFile);
    return new OnDiskInvertedIndex(bufferCache, fileMapProvider, builder, invListTypeTraits, invListCmpFactories, tokenTypeTraits, tokenCmpFactories, btreeFile, invListsFile, pageManagerFactory);
}
Also used : OnDiskInvertedIndex(org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.OnDiskInvertedIndex) PartitionedOnDiskInvertedIndex(org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.PartitionedOnDiskInvertedIndex) IInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder) FixedSizeElementInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.FixedSizeElementInvertedListBuilder) FileReference(org.apache.hyracks.api.io.FileReference)

Example 5 with IInvertedListBuilder

use of org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder in project asterixdb by apache.

the class InvertedIndexUtils method createPartitionedOnDiskInvertedIndex.

public static PartitionedOnDiskInvertedIndex createPartitionedOnDiskInvertedIndex(IIOManager ioManager, IBufferCache bufferCache, IFileMapProvider fileMapProvider, ITypeTraits[] invListTypeTraits, IBinaryComparatorFactory[] invListCmpFactories, ITypeTraits[] tokenTypeTraits, IBinaryComparatorFactory[] tokenCmpFactories, FileReference invListsFile, IPageManagerFactory pageManagerFactory) throws HyracksDataException {
    IInvertedListBuilder builder = new FixedSizeElementInvertedListBuilder(invListTypeTraits);
    FileReference btreeFile = getBTreeFile(ioManager, invListsFile);
    return new PartitionedOnDiskInvertedIndex(bufferCache, fileMapProvider, builder, invListTypeTraits, invListCmpFactories, tokenTypeTraits, tokenCmpFactories, btreeFile, invListsFile, pageManagerFactory);
}
Also used : IInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder) PartitionedOnDiskInvertedIndex(org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.PartitionedOnDiskInvertedIndex) FixedSizeElementInvertedListBuilder(org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.FixedSizeElementInvertedListBuilder) FileReference(org.apache.hyracks.api.io.FileReference)

Aggregations

FileReference (org.apache.hyracks.api.io.FileReference)5 IInvertedListBuilder (org.apache.hyracks.storage.am.lsm.invertedindex.api.IInvertedListBuilder)5 FixedSizeElementInvertedListBuilder (org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.FixedSizeElementInvertedListBuilder)2 PartitionedOnDiskInvertedIndex (org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.PartitionedOnDiskInvertedIndex)2 IBinaryComparatorFactory (org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory)1 ITypeTraits (org.apache.hyracks.api.dataflow.value.ITypeTraits)1 OnDiskInvertedIndex (org.apache.hyracks.storage.am.lsm.invertedindex.ondisk.OnDiskInvertedIndex)1