use of org.apache.hyracks.storage.am.lsm.common.impls.DiskComponentMetadata in project asterixdb by apache.
the class AbstractLSMIOOperationCallback method getComponentLSN.
public long getComponentLSN(List<? extends ILSMComponent> diskComponents) throws HyracksDataException {
if (diskComponents == null) {
// Flush operation of an LSM index are executed sequentially.
synchronized (this) {
long lsn = mutableLastLSNs[readIndex];
return lsn;
}
}
// Get max LSN from the diskComponents. Implies a merge IO operation or Recovery operation.
long maxLSN = -1L;
for (ILSMComponent c : diskComponents) {
DiskComponentMetadata md = ((ILSMDiskComponent) c).getMetadata();
maxLSN = Math.max(getTreeIndexLSN(md), maxLSN);
}
return maxLSN;
}
use of org.apache.hyracks.storage.am.lsm.common.impls.DiskComponentMetadata in project asterixdb by apache.
the class AbstractLSMIOOperationCallback method putComponentIdIntoMetadata.
private void putComponentIdIntoMetadata(ILSMDiskComponent component, List<ILSMComponent> oldComponents) throws HyracksDataException {
DiskComponentMetadata metadata = component.getMetadata();
ILSMDiskComponentId componentId = getComponentId(oldComponents);
metadata.put(ILSMDiskComponentId.COMPONENT_ID_MIN_KEY, LongPointable.FACTORY.createPointable(componentId.getMinId()));
metadata.put(ILSMDiskComponentId.COMPONENT_ID_MAX_KEY, LongPointable.FACTORY.createPointable(componentId.getMaxId()));
}
Aggregations