use of org.apache.hyracks.api.io.FileReference in project asterixdb by apache.
the class ExternalRTreeLocalResource method createInstance.
@Override
public IIndex createInstance(INCServiceContext ncServiceCtx) throws HyracksDataException {
IIOManager ioManager = ncServiceCtx.getIoManager();
FileReference fileRef = ioManager.resolve(path);
return LSMRTreeUtils.createExternalRTree(ioManager, 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, buddyBTreeFields, durable, isPointMBR, metadataPageManagerFactory);
}
use of org.apache.hyracks.api.io.FileReference in project asterixdb by apache.
the class WorkspaceFileFactory method createManagedWorkspaceFile.
@Override
public FileReference createManagedWorkspaceFile(String prefix) throws HyracksDataException {
final FileReference fRef = ioManager.createWorkspaceFile(prefix);
registry.registerDeallocatable(new IDeallocatable() {
@Override
public void deallocate() {
// Delete the created managed file.
FileUtils.deleteQuietly(fRef.getFile());
}
});
return fRef;
}
Aggregations