asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [66/85] [abbrv] incubator-asterixdb-hyracks git commit: Added a new method to switch LSM component state Change-Id: If4647e31c1a81e29093f84a26059b020508db7f6 Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/208 Tested-by: Jenkins <jenkins@fulliautomat
Date Fri, 24 Apr 2015 18:46:33 GMT
Added a new method to switch LSM component state
Change-Id: If4647e31c1a81e29093f84a26059b020508db7f6
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/208
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
Reviewed-by: Ian Maxon <imaxon@uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/commit/3d990f05
Tree: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/tree/3d990f05
Diff: http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/diff/3d990f05

Branch: refs/heads/master
Commit: 3d990f05c546b2bf7ebfaa4a4372d4c64c936e7d
Parents: e1413cc
Author: hubailmor@gmail.com <mhubail@uci.edu>
Authored: Sat Jan 24 21:41:09 2015 -0800
Committer: Ian Maxon <imaxon@uci.edu>
Committed: Tue Jan 27 13:22:18 2015 -0800

----------------------------------------------------------------------
 .../hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java   | 5 +++++
 .../storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/3d990f05/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractLSMIndex.java
----------------------------------------------------------------------
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 ccc1d38..ee03570 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
@@ -25,6 +25,7 @@ import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.am.common.api.ITreeIndex;
 import edu.uci.ics.hyracks.storage.am.common.api.ITreeIndexMetaDataFrame;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMComponent;
+import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMComponent.ComponentState;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMComponentFilterFrameFactory;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMHarness;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallback;
@@ -258,4 +259,8 @@ public abstract class AbstractLSMIndex implements ILSMIndexInternal {
         //check if the current memory component has been modified
         return !((AbstractMemoryLSMComponent) memoryComponents.get(currentMutableComponentId.get())).isModified();
     }
+    
+    public void makeCurrentMutableComponentUnWritable() throws HyracksDataException {
+        ((AbstractMemoryLSMComponent) memoryComponents.get(currentMutableComponentId.get())).setState(ComponentState.READABLE_UNWRITABLE);
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/3d990f05/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java
b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java
index 2c59677..b86e98f 100644
--- a/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java
+++ b/hyracks/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/AbstractMemoryLSMComponent.java
@@ -161,6 +161,10 @@ public abstract class AbstractMemoryLSMComponent extends AbstractLSMComponent
{
     public ComponentState getState() {
         return state;
     }
+    
+    public void setState(ComponentState state) {
+        this.state = state;
+    }
 
     public void setActive() {
         requestedToBeActive = true;


Mime
View raw message