Search in sources :

Example 1 with LSMBTreeWithBuddyDiskComponent

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

the class LSMBTreeWithBuddyIOOperationCallback method getComponentFileLSNOffset.

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

Aggregations

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