commit | 62b22d19d0c9c539b39579cc8ac8f0261caa93f4 | [log] [tgz] |
---|---|---|
author | hubailmor@gmail.com <mhubail@uci.edu> | Wed Nov 12 15:25:02 2014 -0800 |
committer | Ian Maxon <imaxon@uci.edu> | Wed Nov 12 16:28:40 2014 -0800 |
tree | 4387f94b3901d462ad747b851d2526c9c13b00d8 | |
parent | ce8ee315365fb8492f39feea781562ceb1fca219 [diff] |
Added a method to check current LSM component status The following commits from your working branch will be included: commit caf3da2933ce7218492bf2c05cb9553d4686cac3 Author: hubailmor@gmail.com <mhubail@uci.edu> Date: Tue Nov 11 12:45:32 2014 -0800 Added a method to check current LSM component status Change-Id: I3a5a5a5bdc1eb02bfc78f94afc574ce8f2d12659 Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/170 Reviewed-by: Young-Seok Kim <kisskys@gmail.com> Reviewed-by: Ian Maxon <imaxon@uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIndexInternal.java b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIndexInternal.java index b8f590f..bf82c31 100644 --- a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIndexInternal.java +++ b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIndexInternal.java
@@ -64,4 +64,7 @@ public void getOperationalComponents(ILSMIndexOperationContext ctx); public void markAsValid(ILSMComponent lsmComponent) throws HyracksDataException; + + public boolean isCurrentMutableComponentEmpty() throws HyracksDataException; + }
diff --git a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java index e8014a7..ccc1d38 100644 --- a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java +++ b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
@@ -252,4 +252,10 @@ public boolean hasMemoryComponents() { return true; } + + @Override + public boolean isCurrentMutableComponentEmpty() throws HyracksDataException { + //check if the current memory component has been modified + return !((AbstractMemoryLSMComponent) memoryComponents.get(currentMutableComponentId.get())).isModified(); + } }