asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject incubator-asterixdb git commit: prevented secondary index insert operator in feed from dropping frames
Date Mon, 09 Nov 2015 17:06:45 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master eacff7818 -> b87772177


prevented secondary index insert operator in feed from dropping frames

Change-Id: I5a22b7a56e476b0cb4535ba4323419ef7eb69fb1
Reviewed-on: https://asterix-gerrit.ics.uci.edu/446
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>


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

Branch: refs/heads/master
Commit: b87772177bc819f00d364f0dfa4f6f815255948c
Parents: eacff78
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Oct 9 20:51:58 2015 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Mon Nov 9 09:03:05 2015 -0800

----------------------------------------------------------------------
 .../AsterixLSMInsertDeleteOperatorNodePushable.java       |  4 ++++
 .../asterix/common/feeds/FeedRuntimeInputHandler.java     | 10 +++++++++-
 .../asterix/metadata/feeds/FeedMetaStoreNodePushable.java |  7 +++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/b8777217/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInsertDeleteOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInsertDeleteOperatorNodePushable.java
b/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInsertDeleteOperatorNodePushable.java
index a5dcf18..4118f5e 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInsertDeleteOperatorNodePushable.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMInsertDeleteOperatorNodePushable.java
@@ -41,6 +41,10 @@ public class AsterixLSMInsertDeleteOperatorNodePushable extends LSMIndexInsertUp
 
     private final boolean isPrimary;
 
+    public boolean isPrimary() {
+        return isPrimary;
+    }
+
     public AsterixLSMInsertDeleteOperatorNodePushable(IIndexOperatorDescriptor opDesc, IHyracksTaskContext
ctx,
             int partition, int[] fieldPermutation, IRecordDescriptorProvider recordDescProvider,
IndexOperation op,
             boolean isPrimary) {

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/b8777217/asterix-common/src/main/java/org/apache/asterix/common/feeds/FeedRuntimeInputHandler.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/org/apache/asterix/common/feeds/FeedRuntimeInputHandler.java
b/asterix-common/src/main/java/org/apache/asterix/common/feeds/FeedRuntimeInputHandler.java
index e0663ed..cafc699 100644
--- a/asterix-common/src/main/java/org/apache/asterix/common/feeds/FeedRuntimeInputHandler.java
+++ b/asterix-common/src/main/java/org/apache/asterix/common/feeds/FeedRuntimeInputHandler.java
@@ -49,7 +49,7 @@ public class FeedRuntimeInputHandler implements IFrameWriter {
     private final FeedConnectionId connectionId;
     private final FeedRuntimeId runtimeId;
     private final FeedPolicyAccessor feedPolicyAccessor;
-    private final boolean bufferingEnabled;
+    private boolean bufferingEnabled;
     private final IExceptionHandler exceptionHandler;
     private final FeedFrameDiscarder discarder;
     private final FeedFrameSpiller spiller;
@@ -427,4 +427,12 @@ public class FeedRuntimeInputHandler implements IFrameWriter {
             }
         }
     }
+
+    public boolean isBufferingEnabled() {
+        return bufferingEnabled;
+    }
+
+    public void setBufferingEnabled(boolean bufferingEnabled) {
+        this.bufferingEnabled = bufferingEnabled;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/b8777217/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
index 5275e4c..a18f4d8 100644
--- a/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
+++ b/asterix-metadata/src/main/java/org/apache/asterix/metadata/feeds/FeedMetaStoreNodePushable.java
@@ -24,6 +24,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import org.apache.asterix.common.api.IAsterixAppRuntimeContext;
+import org.apache.asterix.common.dataflow.AsterixLSMInsertDeleteOperatorNodePushable;
 import org.apache.asterix.common.feeds.FeedConnectionId;
 import org.apache.asterix.common.feeds.FeedRuntime;
 import org.apache.asterix.common.feeds.FeedRuntimeId;
@@ -130,6 +131,12 @@ public class FeedMetaStoreNodePushable extends AbstractUnaryInputUnaryOutputOper
         this.inputSideHandler = new FeedRuntimeInputHandler(ctx, connectionId, runtimeId,
coreOperator,
                 policyEnforcer.getFeedPolicyAccessor(), true, fta, recordDesc, feedManager,
                 nPartitions);
+        if(coreOperator instanceof AsterixLSMInsertDeleteOperatorNodePushable){
+            AsterixLSMInsertDeleteOperatorNodePushable indexOp = (AsterixLSMInsertDeleteOperatorNodePushable)
coreOperator;
+            if(!indexOp.isPrimary()){
+                inputSideHandler.setBufferingEnabled(false);
+            }
+        }
         setupBasicRuntime(inputSideHandler);
     }
 


Mime
View raw message