You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ay...@apache.org on 2022/09/20 17:21:39 UTC

[hive] branch master updated: HIVE-26532: Remove logger from critical path in VectorMapJoinInnerLongOperator::processBatch (#3594). (Rajesh Balamohan, reviewed by Ayush Saxena)

This is an automated email from the ASF dual-hosted git repository.

ayushsaxena pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 473d361ef8f HIVE-26532: Remove logger from critical path in VectorMapJoinInnerLongOperator::processBatch (#3594). (Rajesh Balamohan, reviewed by Ayush Saxena)
473d361ef8f is described below

commit 473d361ef8fdb9c25e773c00f9aca86ea105798c
Author: rbalamohan <rb...@apache.org>
AuthorDate: Tue Sep 20 22:51:31 2022 +0530

    HIVE-26532: Remove logger from critical path in VectorMapJoinInnerLongOperator::processBatch (#3594). (Rajesh Balamohan, reviewed by Ayush Saxena)
---
 .../exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java   | 11 ++++++++---
 .../exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java |  9 +++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
index 5ac606ab01d..6b17b9b1722 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinInnerLongOperator.java
@@ -77,6 +77,8 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
   // The column number for this one column join specialization.
   private transient int singleJoinColumn;
 
+  private transient boolean isDebugEnabled;
+
   //---------------------------------------------------------------------------
   // Pass-thru constructors.
   //
@@ -84,15 +86,18 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
   /** Kryo ctor. */
   protected VectorMapJoinInnerLongOperator() {
     super();
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   public VectorMapJoinInnerLongOperator(CompilationOpContext ctx) {
     super(ctx);
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   public VectorMapJoinInnerLongOperator(CompilationOpContext ctx, OperatorDesc conf,
       VectorizationContext vContext, VectorDesc vectorDesc) throws HiveException {
     super(ctx, conf, vContext, vectorDesc);
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   //---------------------------------------------------------------------------
@@ -197,7 +202,7 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
          * Common repeated join result processing.
          */
 
-        if (LOG.isDebugEnabled()) {
+        if (isDebugEnabled) {
           LOG.debug(CLASS_NAME + " batch #" + batchCounter + " repeated joinResult " + joinResult.name());
         }
         finishInnerRepeated(batch, joinResult, hashMapResults[0]);
@@ -207,7 +212,7 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
          * NOT Repeating.
          */
 
-        if (LOG.isDebugEnabled()) {
+        if (isDebugEnabled) {
           LOG.debug(CLASS_NAME + " batch #" + batchCounter + " non-repeated");
         }
 
@@ -361,7 +366,7 @@ public class VectorMapJoinInnerLongOperator extends VectorMapJoinInnerGenerateRe
           }
         }
 
-        if (LOG.isDebugEnabled()) {
+        if (isDebugEnabled) {
           LOG.debug(CLASS_NAME +
               " allMatchs " + intArrayToRangesString(allMatchs,allMatchCount) +
               " equalKeySeriesHashMapResultIndices " + intArrayToRangesString(equalKeySeriesHashMapResultIndices, equalKeySeriesCount) +
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java
index a19941a633c..ba43696bb18 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterStringOperator.java
@@ -73,6 +73,8 @@ public class VectorMapJoinOuterStringOperator extends VectorMapJoinOuterGenerate
   // The column number for this one column join specialization.
   protected transient int singleJoinColumn;
 
+  private transient boolean isDebugEnabled;
+
   //---------------------------------------------------------------------------
   // Pass-thru constructors.
   //
@@ -80,15 +82,18 @@ public class VectorMapJoinOuterStringOperator extends VectorMapJoinOuterGenerate
   /** Kryo ctor. */
   protected VectorMapJoinOuterStringOperator() {
     super();
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   public VectorMapJoinOuterStringOperator(CompilationOpContext ctx) {
     super(ctx);
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   public VectorMapJoinOuterStringOperator(CompilationOpContext ctx, OperatorDesc conf,
       VectorizationContext vContext, VectorDesc vectorDesc) throws HiveException {
     super(ctx, conf, vContext, vectorDesc);
+    isDebugEnabled = LOG.isDebugEnabled();
   }
 
   //---------------------------------------------------------------------------
@@ -204,7 +209,7 @@ public class VectorMapJoinOuterStringOperator extends VectorMapJoinOuterGenerate
          * Common repeated join result processing.
          */
 
-        if (LOG.isDebugEnabled()) {
+        if (isDebugEnabled) {
           LOG.debug(CLASS_NAME + " batch #" + batchCounter + " repeated joinResult " + joinResult.name());
         }
         finishOuterRepeated(batch, joinResult, hashMapResults[0], someRowsFilteredOut,
@@ -369,7 +374,7 @@ public class VectorMapJoinOuterStringOperator extends VectorMapJoinOuterGenerate
           }
         }
 
-        if (LOG.isDebugEnabled()) {
+        if (isDebugEnabled) {
           LOG.debug(CLASS_NAME + " batch #" + batchCounter +
               " allMatchs " + intArrayToRangesString(allMatchs,allMatchCount) +
               " equalKeySeriesHashMapResultIndices " + intArrayToRangesString(equalKeySeriesHashMapResultIndices, equalKeySeriesCount) +