Search in sources :

Example 1 with LSMBTreeDiskComponent

use of org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeDiskComponent in project asterixdb by apache.

the class LSMBTreeIOOperationCallback method getComponentFileLSNOffset.

@Override
public long getComponentFileLSNOffset(ILSMDiskComponent diskComponent, String diskComponentFilePath) throws HyracksDataException {
    if (diskComponentFilePath.endsWith(LSMBTreeFileManager.BTREE_STRING)) {
        LSMBTreeDiskComponent btreeComponent = (LSMBTreeDiskComponent) diskComponent;
        IMetadataPageManager metadataPageManager = (IMetadataPageManager) btreeComponent.getBTree().getPageManager();
        return metadataPageManager.getFileOffset(metadataPageManager.createMetadataFrame(), LSN_KEY);
    }
    return INVALID;
}
Also used : LSMBTreeDiskComponent(org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeDiskComponent) IMetadataPageManager(org.apache.hyracks.storage.am.common.api.IMetadataPageManager)

Aggregations

IMetadataPageManager (org.apache.hyracks.storage.am.common.api.IMetadataPageManager)1 LSMBTreeDiskComponent (org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTreeDiskComponent)1