Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Drill >> mail # dev >> git commit: DRILL-254: Add iterator validator and correct interface violations


Copy link to this message
-
git commit: DRILL-254: Add iterator validator and correct interface violations
Updated Branches:
  refs/heads/master c287fa604 -> d17f48315
DRILL-254: Add iterator validator and correct interface violations
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/d17f4831
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/d17f4831
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/d17f4831

Branch: refs/heads/master
Commit: d17f483158493aca8a971c1674bf0d31975675df
Parents: c287fa6
Author: Jacques Nadeau <[EMAIL PROTECTED]>
Authored: Fri Oct 25 09:32:44 2013 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Sat Nov 9 20:19:13 2013 -0800

----------------------------------------------------------------------
 .../physical/base/AbstractPhysicalVisitor.java  |   5 +
 .../exec/physical/base/PhysicalVisitor.java     |   2 +
 .../exec/physical/config/IteratorValidator.java |  48 ++++++++
 .../drill/exec/physical/impl/ImplCreator.java   |  16 ++-
 .../drill/exec/physical/impl/ScreenCreator.java |  26 ++---
 .../exec/physical/impl/SingleSenderCreator.java |   2 +-
 .../exec/physical/impl/WireRecordBatch.java     |   7 ++
 .../OrderedPartitionRecordBatch.java            |  17 ++-
 .../IteratorValidatorBatchIterator.java         | 116 +++++++++++++++++++
 .../impl/validate/IteratorValidatorCreator.java |  39 +++++++
 .../validate/IteratorValidatorInjector.java     |  74 ++++++++++++
 .../exec/record/FragmentWritableBatch.java      |  20 +++-
 12 files changed, 344 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d17f4831/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractPhysicalVisitor.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractPhysicalVisitor.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractPhysicalVisitor.java
index 9e2ef0a..d1188bf 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractPhysicalVisitor.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractPhysicalVisitor.java
@@ -141,6 +141,11 @@ public abstract class AbstractPhysicalVisitor<T, X, E extends Throwable> impleme
   }
 
   @Override
+  public T visitIteratorValidator(IteratorValidator op, X value) throws E {
+    return visitOp(op, value);
+  }
+
+  @Override
   public T visitOp(PhysicalOperator op, X value) throws E{
     throw new UnsupportedOperationException(String.format(
         "The PhysicalVisitor of type %s does not currently support visiting the PhysicalOperator type %s.", this

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d17f4831/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/PhysicalVisitor.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/PhysicalVisitor.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/PhysicalVisitor.java
index 2474c15..120306a 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/PhysicalVisitor.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/PhysicalVisitor.java
@@ -55,4 +55,6 @@ public interface PhysicalVisitor<RETURN, EXTRA, EXCEP extends Throwable> {
   public RETURN visitScreen(Screen op, EXTRA value) throws EXCEP;
   public RETURN visitSingleSender(SingleSender op, EXTRA value) throws EXCEP;
   public RETURN visitUnionExchange(UnionExchange op, EXTRA value) throws EXCEP;
+  
+  public RETURN visitIteratorValidator(IteratorValidator op, EXTRA value) throws EXCEP;
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/d17f4831/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java
----------diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java
new file mode 100644
index 0000000..67bba96
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.physical.config;
+
+import org.apache.drill.exec.physical.OperatorCost;
+import org.apache.drill.exec.physical.base.AbstractSingle;
+import org.apache.drill.exec.physical.base.PhysicalOperator;
+import org.apache.drill.exec.physical.base.PhysicalVisitor;
+
+public class IteratorValidator extends AbstractSingle{
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(IteratorValidator.class);
+
+  public IteratorValidator(PhysicalOperator child) {
+    super(child);
+    
+  }
+
+  @Override
+  public OperatorCost getCost() {
+    return new OperatorCost(0f, 0f, 0f, 0f);
+  }
+
+  @Override
+  public <T, X, E extends Throwable> T accept(PhysicalVisitor<T, X, E> physicalVisitor, X value) throws E {
+    return physicalVisitor.visitIteratorValidator(this, value);
+  }
+