use of org.apache.hyracks.api.io.IIOManager in project asterixdb by apache.
the class RTreeResource method createInstance.
@Override
public IIndex createInstance(INCServiceContext ctx) throws HyracksDataException {
IIOManager ioManager = ctx.getIoManager();
FileReference resourceRef = ioManager.resolve(path);
return RTreeUtils.createRTree(storageManager.getBufferCache(ctx), storageManager.getFileMapProvider(ctx), typeTraits, valueProviderFactories, comparatorFactories, rtreePolicyType, resourceRef, false, pageManagerFactory);
}
use of org.apache.hyracks.api.io.IIOManager in project asterixdb by apache.
the class ExternalDatasetIndexesCommitOperatorDescriptor method performOpOnIndex.
@Override
protected void performOpOnIndex(IIndexDataflowHelper indexHelper, IHyracksTaskContext ctx) throws HyracksDataException {
String path = indexHelper.getResource().getPath();
IIOManager ioManager = ctx.getIoManager();
FileReference file = ioManager.resolve(path);
LOGGER.warn("performing the operation on " + file.getFile().getAbsolutePath());
// Get index
IIndex index = indexHelper.getIndexInstance();
// commit transaction
((ITwoPCIndex) index).commitTransaction();
LOGGER.warn("operation on " + file.getFile().getAbsolutePath() + " Succeded");
}
use of org.apache.hyracks.api.io.IIOManager in project asterixdb by apache.
the class ExternalDatasetIndexesRecoverOperatorDescriptor method performOpOnIndex.
@Override
protected void performOpOnIndex(IIndexDataflowHelper indexDataflowHelper, IHyracksTaskContext ctx) throws HyracksDataException {
String path = indexDataflowHelper.getResource().getPath();
IIOManager ioManager = ctx.getIoManager();
FileReference file = ioManager.resolve(path);
AbortRecoverLSMIndexFileManager fileManager = new AbortRecoverLSMIndexFileManager(ctx.getIoManager(), file);
fileManager.recoverTransaction();
}
use of org.apache.hyracks.api.io.IIOManager in project asterixdb by apache.
the class LSMInvertedIndexLocalResource method createInstance.
@Override
public ILSMIndex createInstance(INCServiceContext serviceCtx) throws HyracksDataException {
IIOManager ioManager = serviceCtx.getIoManager();
FileReference file = ioManager.resolve(path);
List<IVirtualBufferCache> virtualBufferCaches = vbcProvider.getVirtualBufferCaches(serviceCtx, file);
IBufferCache bufferCache = storageManager.getBufferCache(serviceCtx);
IFileMapProvider fileMapManager = storageManager.getFileMapProvider(serviceCtx);
ILSMMergePolicy mergePolicy = mergePolicyFactory.createMergePolicy(mergePolicyProperties, serviceCtx);
ILSMIOOperationScheduler ioScheduler = ioSchedulerProvider.getIoScheduler(serviceCtx);
if (isPartitioned) {
return InvertedIndexUtils.createPartitionedLSMInvertedIndex(ioManager, virtualBufferCaches, fileMapManager, typeTraits, cmpFactories, tokenTypeTraits, tokenCmpFactories, tokenizerFactory, bufferCache, file.getAbsolutePath(), bloomFilterFalsePositiveRate, mergePolicy, opTrackerProvider.getOperationTracker(serviceCtx), ioScheduler, ioOpCallbackFactory.createIoOpCallback(), invertedIndexFields, filterTypeTraits, filterCmpFactories, filterFields, filterFieldsForNonBulkLoadOps, invertedIndexFieldsForNonBulkLoadOps, durable, metadataPageManagerFactory);
} else {
return InvertedIndexUtils.createLSMInvertedIndex(ioManager, virtualBufferCaches, fileMapManager, typeTraits, cmpFactories, tokenTypeTraits, tokenCmpFactories, tokenizerFactory, bufferCache, file.getAbsolutePath(), bloomFilterFalsePositiveRate, mergePolicy, opTrackerProvider.getOperationTracker(serviceCtx), ioScheduler, ioOpCallbackFactory.createIoOpCallback(), invertedIndexFields, filterTypeTraits, filterCmpFactories, filterFields, filterFieldsForNonBulkLoadOps, invertedIndexFieldsForNonBulkLoadOps, durable, metadataPageManagerFactory);
}
}
use of org.apache.hyracks.api.io.IIOManager in project asterixdb by apache.
the class LSMRTreeLocalResource method createInstance.
@Override
public IIndex createInstance(INCServiceContext ncServiceCtx) throws HyracksDataException {
IIOManager ioManager = ncServiceCtx.getIoManager();
FileReference fileRef = ioManager.resolve(path);
List<IVirtualBufferCache> virtualBufferCaches = vbcProvider.getVirtualBufferCaches(ncServiceCtx, fileRef);
return LSMRTreeUtils.createLSMTree(ioManager, virtualBufferCaches, fileRef, storageManager.getBufferCache(ncServiceCtx), storageManager.getFileMapProvider(ncServiceCtx), typeTraits, cmpFactories, btreeCmpFactories, valueProviderFactories, rtreePolicyType, bloomFilterFalsePositiveRate, mergePolicyFactory.createMergePolicy(mergePolicyProperties, ncServiceCtx), opTrackerProvider.getOperationTracker(ncServiceCtx), ioSchedulerProvider.getIoScheduler(ncServiceCtx), ioOpCallbackFactory.createIoOpCallback(), linearizeCmpFactory, rtreeFields, buddyBTreeFields, filterTypeTraits, filterCmpFactories, filterFields, durable, isPointMBR, metadataPageManagerFactory);
}
Aggregations