use of org.apache.hyracks.storage.common.buffercache.ResourceHeapBufferAllocator in project asterixdb by apache.
the class DatasetVirtualBufferCaches method initializeVirtualBufferCaches.
public List<IVirtualBufferCache> initializeVirtualBufferCaches(IResourceMemoryManager memoryManager, int ioDeviceNum) {
int numPages = datasetID < firstAvilableUserDatasetID ? storageProperties.getMetadataMemoryComponentNumPages() : storageProperties.getMemoryComponentNumPages();
List<IVirtualBufferCache> vbcs = new ArrayList<>();
for (int i = 0; i < storageProperties.getMemoryComponentsNum(); i++) {
MultitenantVirtualBufferCache vbc = new MultitenantVirtualBufferCache(new VirtualBufferCache(new ResourceHeapBufferAllocator(memoryManager, Integer.toString(datasetID)), storageProperties.getMemoryComponentPageSize(), numPages / storageProperties.getMemoryComponentsNum() / numPartitions));
vbcs.add(vbc);
}
ioDeviceVirtualBufferCaches.put(ioDeviceNum, vbcs);
return vbcs;
}
Aggregations