drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ve...@apache.org
Subject drill git commit: DRILL-4434: Deprecate GroupScan.enforceWidth API
Date Fri, 26 Feb 2016 02:21:36 GMT
Repository: drill
Updated Branches:
  refs/heads/master 6d5f49830 -> 3e55fe1db


DRILL-4434: Deprecate GroupScan.enforceWidth API


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/3e55fe1d
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/3e55fe1d
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/3e55fe1d

Branch: refs/heads/master
Commit: 3e55fe1db23e51e39043e3f366b6d1c6bfb73a9c
Parents: 6d5f498
Author: vkorukanti <venki.korukanti@gmail.com>
Authored: Wed Feb 24 14:13:21 2016 -0800
Committer: vkorukanti <venki.korukanti@gmail.com>
Committed: Wed Feb 24 14:13:21 2016 -0800

----------------------------------------------------------------------
 .../apache/drill/exec/physical/base/AbstractGroupScan.java   | 3 ++-
 .../java/org/apache/drill/exec/physical/base/GroupScan.java  | 4 ++++
 .../physical/visitor/ExcessiveExchangeIdentifier.java        | 8 ++++----
 .../org/apache/drill/exec/store/sys/SystemTableScan.java     | 6 ------
 4 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/3e55fe1d/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java
index 77ded54..57fbd00 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScan.java
@@ -85,8 +85,9 @@ public abstract class AbstractGroupScan extends AbstractBase implements
GroupSca
 
   @Override
   @JsonIgnore
+  @Deprecated
   public boolean enforceWidth() {
-    return false;
+    return getMinParallelizationWidth() > 1;
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/drill/blob/3e55fe1d/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java
index daaa5ac..d17c337 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/GroupScan.java
@@ -63,8 +63,12 @@ public interface GroupScan extends Scan, HasAffinity{
    * Check if GroupScan enforces width to be maximum parallelization width.
    * Currently, this is used in {@link org.apache.drill.exec.planner.physical.visitor.ExcessiveExchangeIdentifier}
    * @return if maximum width should be enforced
+   *
+   * @deprecated Use {@link #getMinParallelizationWidth()} to determine whether this GroupScan
spans more than one
+   * fragment.
    */
   @JsonIgnore
+  @Deprecated
   public boolean enforceWidth();
 
   /**

http://git-wip-us.apache.org/repos/asf/drill/blob/3e55fe1d/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/ExcessiveExchangeIdentifier.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/ExcessiveExchangeIdentifier.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/ExcessiveExchangeIdentifier.java
index cbd54be..7686d56 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/ExcessiveExchangeIdentifier.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/ExcessiveExchangeIdentifier.java
@@ -94,7 +94,7 @@ public class ExcessiveExchangeIdentifier extends BasePrelVisitor<Prel,
Excessive
   class MajorFragmentStat {
     private double maxRows = 0d;
     private int maxWidth = Integer.MAX_VALUE;
-    private boolean enforceWidth = false;
+    private boolean isMultiSubScan = false;
 
     public void add(Prel prel) {
       maxRows = Math.max(prel.getRows(), maxRows);
@@ -106,13 +106,13 @@ public class ExcessiveExchangeIdentifier extends BasePrelVisitor<Prel,
Excessive
 
     public void addScan(ScanPrel prel) {
       maxWidth = Math.min(maxWidth, prel.getGroupScan().getMaxParallelizationWidth());
-      enforceWidth = prel.getGroupScan().enforceWidth();
+      isMultiSubScan = prel.getGroupScan().getMinParallelizationWidth() > 1;
       add(prel);
     }
 
     public boolean isSingular() {
-      // do not remove exchanges when a scan enforces width (e.g. SystemTableScan)
-      if (enforceWidth) {
+      // do not remove exchanges when a scan has more than one subscans (e.g. SystemTableScan)
+      if (isMultiSubScan) {
         return false;
       }
 

http://git-wip-us.apache.org/repos/asf/drill/blob/3e55fe1d/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
index 2c3bba4..962e2c6 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTableScan.java
@@ -98,12 +98,6 @@ public class SystemTableScan extends AbstractGroupScan implements SubScan
{
     return table.isDistributed() ? plugin.getContext().getBits().size() : 1;
   }
 
-  // This enforces maximum parallelization width for distributed tables
-  @Override
-  public boolean enforceWidth() {
-    return table.isDistributed();
-  }
-
   @Override
   public long getInitialAllocation() {
     return initialAllocation;


Mime
View raw message