drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject drill git commit: DRILL-4911: Avoid plan serialization in SimpleParallelizer when debug logging is not enabled.
Date Thu, 06 Oct 2016 05:09:58 GMT
Repository: drill
Updated Branches:
  refs/heads/master 1375a0065 -> 4edabe7a3


DRILL-4911:  Avoid plan serialization in SimpleParallelizer when debug logging is not enabled.


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

Branch: refs/heads/master
Commit: 4edabe7a392f38b0f7a9c8af51a74bf6932a821d
Parents: 1375a00
Author: Jinfeng Ni <jni@apache.org>
Authored: Wed Sep 21 16:03:49 2016 -0700
Committer: Jinfeng Ni <jni@apache.org>
Committed: Wed Oct 5 20:40:46 2016 -0700

----------------------------------------------------------------------
 .../drill/exec/planner/fragment/SimpleParallelizer.java      | 8 ++++++--
 .../exec/planner/fragment/contrib/SplittingParallelizer.java | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/4edabe7a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java
index 47de88e..c389e89 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/SimpleParallelizer.java
@@ -316,11 +316,15 @@ public class SimpleParallelizer implements ParallelizationParameters
{
             .build();
 
         if (isRootNode) {
-          logger.debug("Root fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          if (logger.isDebugEnabled()) {
+            logger.debug("Root fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          }
           rootFragment = fragment;
           rootOperator = root;
         } else {
-          logger.debug("Remote fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          if (logger.isDebugEnabled()) {
+            logger.debug("Remote fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          }
           fragments.add(fragment);
         }
       }

http://git-wip-us.apache.org/repos/asf/drill/blob/4edabe7a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
index 3488e7f..395a9e1 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
@@ -211,11 +211,15 @@ public class SplittingParallelizer extends SimpleParallelizer {
             .build();
 
         if (isRootNode) {
-          logger.debug("Root fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          if (logger.isDebugEnabled()) {
+            logger.debug("Root fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          }
           rootFragment = fragment;
           rootOperator = root;
         } else {
-          logger.debug("Remote fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          if (logger.isDebugEnabled()) {
+            logger.debug("Remote fragment:\n {}", DrillStringUtils.unescapeJava(fragment.toString()));
+          }
           throw new ForemanSetupException(String.format("There should not be non-root/remote
fragment present in plan split, but there is:",
               DrillStringUtils.unescapeJava(fragment.toString())));
          }


Mime
View raw message