Search in sources :

Example 1 with LSMRTreeDiskComponent

use of org.apache.hyracks.storage.am.lsm.rtree.impls.LSMRTreeDiskComponent in project asterixdb by apache.

the class LSMRTreeIOOperationCallback method getComponentFileLSNOffset.

@Override
public long getComponentFileLSNOffset(ILSMDiskComponent diskComponent, String diskComponentFilePath) throws HyracksDataException {
    if (diskComponentFilePath.endsWith(LSMRTreeFileManager.RTREE_STRING)) {
        LSMRTreeDiskComponent rtreeComponent = (LSMRTreeDiskComponent) diskComponent;
        IMetadataPageManager metadataPageManager = (IMetadataPageManager) rtreeComponent.getRTree().getPageManager();
        return metadataPageManager.getFileOffset(metadataPageManager.createMetadataFrame(), LSN_KEY);
    }
    return INVALID;
}
Also used : IMetadataPageManager(org.apache.hyracks.storage.am.common.api.IMetadataPageManager) LSMRTreeDiskComponent(org.apache.hyracks.storage.am.lsm.rtree.impls.LSMRTreeDiskComponent)

Aggregations

IMetadataPageManager (org.apache.hyracks.storage.am.common.api.IMetadataPageManager)1 LSMRTreeDiskComponent (org.apache.hyracks.storage.am.lsm.rtree.impls.LSMRTreeDiskComponent)1