You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/05/21 21:48:46 UTC

[GitHub] [hive] belugabehr opened a new pull request #2310: HIVE-25152: Remove Superfluous Logging Code

belugabehr opened a new pull request #2310:
URL: https://github.com/apache/hive/pull/2310


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/Hive/HowToContribute
     2. Ensure that you have created an issue on the Hive project JIRA: https://issues.apache.org/jira/projects/HIVE/summary
     3. Ensure you have added or run the appropriate tests for your PR: 
     4. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP]HIVE-XXXXX:  Your PR title ...'.
     5. Be sure to keep the PR description updated to reflect all changes.
     6. Please write your PR title to summarize what this PR proposes.
     7. If possible, provide a concise example to reproduce the issue for a faster review.
   
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description, screenshot and/or a reproducable example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Hive versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on pull request #2310:
URL: https://github.com/apache/hive/pull/2310#issuecomment-846543650


   > ... continued...
   > 
   > That is to say:
   > 
   > ```java
   > LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);
   > LOG.info("New Final Path: FS {}", fsp.finalPaths[filesIdx]);
   > ```
   > 
   > These two statements, will always produce the same output (as INFO is on by default in every production environment under the sun). However, the second one will always have the overhead of having to find the anchor in the format string and then replace it with the value. The first example, there is simply a string concatenation that occurs. This will be faster and I don't find this log particularly hard to read.
   
   Hey @belugabehr thanks for the details! I agree adding anchors on all INFO statements wont add and perf value here considering that INFO is the default log lvl -- I was mostly thinking consistency when posting the comments, eventually using a single logging style but maybe thats out of the scope of this PR.
   
   Happy to +1 as is and maybe discuss this as part of a new ticket


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383213



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/AppMasterEventOperator.java
##########
@@ -100,19 +100,16 @@ public void process(Object row, int tag) throws HiveException {
       Writable writableRow = serializer.serialize(row, rowInspector);
       writableRow.write(buffer);
       if (buffer.getLength() > MAX_SIZE) {
-        if (LOG.isInfoEnabled()) {
-          LOG.info("Disabling AM events. Buffer size too large: " + buffer.getLength());
-        }
+        LOG.info("Disabling AM events. Buffer size too large: " + buffer.getLength());

Review comment:
       Disabling AM events. Buffer size too large: {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383222



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/AppMasterEventOperator.java
##########
@@ -137,10 +134,8 @@ public void closeOp(boolean abort) throws HiveException {
           InputInitializerEvent.create(vertexName, inputName,
               ByteBuffer.wrap(payload, 0, payload.length));
 
-      if (LOG.isInfoEnabled()) {
-        LOG.info("Sending Tez event to vertex = " + vertexName + ", input = " + inputName
-          + ". Payload size = " + payload.length);
-      }
+      LOG.info("Sending Tez event to vertex = " + vertexName + ", input = " + inputName + ". Payload size = "

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java
##########
@@ -391,9 +391,7 @@ protected void initializeOp(Configuration hconf) throws HiveException {
       }
     }
 
-    if (LOG.isInfoEnabled()) {
-      LOG.info("JOIN " + outputObjInspector.getTypeName() + " totalsz = " + totalSz);
-    }
+    LOG.info("JOIN " + outputObjInspector.getTypeName() + " totalsz = " + totalSz);

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/DemuxOperator.java
##########
@@ -185,10 +185,7 @@ protected void initializeOp(Configuration hconf) throws HiveException {
       }
       newChildOperatorsTag[i] = toArray(childOperatorTags);
     }
-    if (LOG.isInfoEnabled()) {
-      LOG.info("newChildOperatorsTag " + Arrays.toString(newChildOperatorsTag));
-    }
-
+    LOG.info("newChildOperatorsTag " + Arrays.toString(newChildOperatorsTag));

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383312



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
##########
@@ -422,11 +420,9 @@ public void initializeBucketPaths(int filesIdx, String taskId, boolean isNativeT
           finalPaths[filesIdx] = finalPath;
           outPaths[filesIdx] = finalPath;
         }
-        if (LOG.isInfoEnabled()) {
-          LOG.info("Final Path: FS " + finalPaths[filesIdx]);
-          if (LOG.isInfoEnabled() && (!isMmTable && !isDirectInsert)) {
-            LOG.info("Writing to temp file: FS " + outPaths[filesIdx]);
-          }
+        LOG.info("Final Path: FS " + finalPaths[filesIdx]);

Review comment:
       {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] belugabehr commented on pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
belugabehr commented on pull request #2310:
URL: https://github.com/apache/hive/pull/2310#issuecomment-846427159


   ... continued...
   
   That is to say:
   
   ```java
   LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);
   LOG.info("New Final Path: FS {}", fsp.finalPaths[filesIdx]);
   ```
   
   These two statements, will always produce the same output (as INFO is on be default in every production under the sun).  However, the second one will always have the overhead of having to find the anchor in the format string and then replace it with the value.  The first example, there is simply a string concatenation that occurs.  This will be faster and I don't find this log particularly hard to read.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383179



##########
File path: llap-tez/src/java/org/apache/hadoop/hive/llap/tezplugins/LlapTaskCommunicator.java
##########
@@ -164,9 +164,7 @@ public LlapTaskCommunicator(
     } else {
       this.token = null;
     }
-    if (LOG.isInfoEnabled()) {
-      LOG.info("Task communicator with a token " + token);
-    }
+    LOG.info("Task communicator with a token " + token);

Review comment:
       Task communicator with a token {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383354



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java
##########
@@ -831,9 +827,7 @@ public void closeOp(boolean abort) throws HiveException {
         }
       }
 
-      if (LOG.isInfoEnabled()) {
-        LOG.info("spilled: " + spilled + " abort: " + abort + ". Clearing spilled partitions.");
-      }
+      LOG.info("spilled: " + spilled + " abort: " + abort + ". Clearing spilled partitions.");

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java
##########
@@ -896,9 +886,7 @@ protected void createBucketForFileIdx(FSPaths fsp, int filesIdx)
           + "; out path " + fsp.outPaths[filesIdx] +" (spec path " + specPath + ", tmp path "
           + fsp.buildTmpPath() + ", task " + taskId + ")");
       }
-      if (LOG.isInfoEnabled()) {
-        LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);
-      }
+      LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382777



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
##########
@@ -263,22 +263,16 @@ public void configure(JobConf job) {
       isSupported = isSerdeBased = checkInputFormatForLlapEncode(conf, ifName);
     }
     if ((!isSupported || !isVectorized) && !isCacheOnly) {
-      if (LOG.isInfoEnabled()) {
-        LOG.info("Not using llap for " + ifName + ": supported = "
-          + isSupported + ", vectorized = " + isVectorized + ", cache only = " + isCacheOnly);
-      }
+      LOG.info("Not using llap for " + ifName + ": supported = " + isSupported + ", vectorized = " + isVectorized

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383027



##########
File path: accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/AccumuloPredicateHandler.java
##########
@@ -320,9 +320,7 @@ protected Object generateRanges(Configuration conf, ColumnMapper columnMapper,
         itrs.add(toSetting(mapping, sc, binaryEncodedRow));
       }
     }
-    if (LOG.isInfoEnabled()) {
-      LOG.info("num iterators = " + itrs.size());
-    }
+    LOG.info("num iterators = " + itrs.size());

Review comment:
       num iterators = {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] belugabehr merged pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
belugabehr merged pull request #2310:
URL: https://github.com/apache/hive/pull/2310


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383275



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/DemuxOperator.java
##########
@@ -211,15 +208,11 @@ protected void initializeOp(Configuration hconf) throws HiveException {
   @Override
   protected void initializeChildren(Configuration hconf) throws HiveException {
     state = State.INIT;
-    if (LOG.isInfoEnabled()) {
-      LOG.info("Operator " + id + " " + getName() + " initialized");
-      LOG.info("Initializing children of " + id + " " + getName());
-    }
+    LOG.info("Operator " + id + " " + getName() + " initialized");

Review comment:
       All below need to switch to {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383144



##########
File path: llap-server/src/java/org/apache/hadoop/hive/llap/security/LlapServerSecurityInfo.java
##########
@@ -33,9 +33,7 @@
 
   @Override
   public KerberosInfo getKerberosInfo(Class<?> protocol, Configuration conf) {
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("Trying to get KerberosInfo for " + protocol);
-    }
+    LOG.debug("Trying to get KerberosInfo for " + protocol);

Review comment:
       Trying to reacquire due to create error: {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382803



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
##########
@@ -831,9 +817,7 @@ private static void processForWriteIdsForMmRead(Path dir, Configuration conf,
     DeltaFilesMetricReporter.backPropagateAcidMetrics(job, newjob);
 
     Utilities.clearWorkMapForConf(job);
-    if (LOG.isInfoEnabled()) {
-      LOG.info("number of splits " + result.size());
-    }
+    LOG.info("number of splits " + result.size());

Review comment:
       number of splits {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] belugabehr commented on pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
belugabehr commented on pull request #2310:
URL: https://github.com/apache/hive/pull/2310#issuecomment-846426813


   @pgaref Thank you so much for your interest in this.
   
   I do not believe the requested changes will yield any value.  The two reasons one would use the anchors `{}` in SLF4J is twofold:
   
   1. Readability (String formatting and no need for boilerplate logging guards)
   2. Performance when _not_ logging
   
   This PR is simply to remove superfluous code that does not add any measurable value and makes the code harder to read.  I don't want to be adding in new code changes if I can help it.
   
   With that said, in any production environment, the logging level will always be _at least_: INFO, WARN, ERROR.  Therefore, there is no need to ever care about performance of INFO messages.  It is _assumed_ that they will always be printed, so there is no need to add logging guards (`if (Log.isInfoEnabled())`) and there is no need for anchors.  Again, anchors are nice for readability, but I don't want to modify the existing INFO level logging too much; that is another exercise for another PR if someone is truly inclined.  I think it's better to just stop introducing this superfluous code moving forward and the old stuff will eventually be updated.
   
   Thanks.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] belugabehr edited a comment on pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
belugabehr edited a comment on pull request #2310:
URL: https://github.com/apache/hive/pull/2310#issuecomment-846427159


   ... continued...
   
   That is to say:
   
   ```java
   LOG.info("New Final Path: FS " + fsp.finalPaths[filesIdx]);
   LOG.info("New Final Path: FS {}", fsp.finalPaths[filesIdx]);
   ```
   
   These two statements, will always produce the same output (as INFO is on by default in every production environment under the sun).  However, the second one will always have the overhead of having to find the anchor in the format string and then replace it with the value.  The first example, there is simply a string concatenation that occurs.  This will be faster and I don't find this log particularly hard to read.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382961



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
##########
@@ -197,9 +197,7 @@ public int compare(MapJoinOperator mj1, MapJoinOperator mj2) {
           }
 
           if (size < remainingSize) {
-            if (LOG.isInfoEnabled()) {
-              LOG.info("Setting " + size + " bytes needed for " + mj + " (in-mem)");
-            }
+            LOG.info("Setting " + size + " bytes needed for " + mj + " (in-mem)");

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
##########
@@ -226,23 +224,17 @@ public int compare(MapJoinOperator mj1, MapJoinOperator mj2) {
 
         for (MapJoinOperator mj : sortedMapJoins) {
           long size = (long)(weight * sizes.get(mj));
-          if (LOG.isInfoEnabled()) {
-            LOG.info("Setting " + size + " bytes needed for " + mj + " (spills)");
-          }
+          LOG.info("Setting " + size + " bytes needed for " + mj + " (spills)");

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/MemoryDecider.java
##########
@@ -226,23 +224,17 @@ public int compare(MapJoinOperator mj1, MapJoinOperator mj2) {
 
         for (MapJoinOperator mj : sortedMapJoins) {
           long size = (long)(weight * sizes.get(mj));
-          if (LOG.isInfoEnabled()) {
-            LOG.info("Setting " + size + " bytes needed for " + mj + " (spills)");
-          }
+          LOG.info("Setting " + size + " bytes needed for " + mj + " (spills)");
 
           mj.getConf().setMemoryNeeded(size);
         }
       } catch (HiveException e) {
         // if we have issues with stats, just scale linearily
         long size = totalAvailableMemory / mapJoins.size();
-        if (LOG.isInfoEnabled()) {
-          LOG.info("Scaling mapjoin memory w/o stats");
-        }
+        LOG.info("Scaling mapjoin memory w/o stats");
 
         for (MapJoinOperator mj : mapJoins) {
-          if (LOG.isInfoEnabled()) {
-            LOG.info("Setting " + size + " bytes needed for " + mj + " (fallback)");
-          }
+          LOG.info("Setting " + size + " bytes needed for " + mj + " (fallback)");

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382893



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
##########
@@ -1463,15 +1441,11 @@ public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object..
           ndRecursive = ndRecursive.getChildren().get(0);
         }
         if (ndRecursive.getChildren().get(0) instanceof ReduceSinkOperator) {
-          if (LOG.isDebugEnabled()) {
-            LOG.debug("Skip JOIN-FIL(*)-RS structure.");
-          }
+          LOG.debug("Skip JOIN-FIL(*)-RS structure.");
           return null;
         }
       }
-      if (LOG.isInfoEnabled()) {
-        LOG.info("Old exprs " + conf.getExprs());
-      }
+      LOG.info("Old exprs " + conf.getExprs());

Review comment:
       Old exprs {}

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
##########
@@ -1484,18 +1458,14 @@ public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object..
         for (ExprNodeDesc expr : exprs) {
           ExprNodeDesc newExpr = foldExpr(expr, constants, cppCtx, op, tag, false);
           if (newExpr instanceof ExprNodeConstantDesc) {
-            if (LOG.isInfoEnabled()) {
-              LOG.info("expr " + newExpr + " fold from " + expr + " is removed.");
-            }
+            LOG.info("expr " + newExpr + " fold from " + expr + " is removed.");

Review comment:
       same

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java
##########
@@ -1484,18 +1458,14 @@ public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx ctx, Object..
         for (ExprNodeDesc expr : exprs) {
           ExprNodeDesc newExpr = foldExpr(expr, constants, cppCtx, op, tag, false);
           if (newExpr instanceof ExprNodeConstantDesc) {
-            if (LOG.isInfoEnabled()) {
-              LOG.info("expr " + newExpr + " fold from " + expr + " is removed.");
-            }
+            LOG.info("expr " + newExpr + " fold from " + expr + " is removed.");
             continue;
           }
           newExprs.add(newExpr);
         }
         e.setValue(newExprs);
       }
-      if (LOG.isInfoEnabled()) {
-        LOG.info("New exprs " + conf.getExprs());
-      }
+      LOG.info("New exprs " + conf.getExprs());

Review comment:
       same




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382683



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkCommonOperator.java
##########
@@ -267,9 +267,7 @@ protected void initializeOp(Configuration hconf) throws HiveException {
     reduceSkipTag = conf.getSkipTag();
     reduceTagByte = (byte) conf.getTag();
 
-    if (LOG.isInfoEnabled()) {
-      LOG.info("Using tag = " + (int) reduceTagByte);
-    }
+    LOG.info("Using tag = " + reduceTagByte);

Review comment:
       Using tag = {} 

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/vector/reducesink/VectorReduceSinkCommonOperator.java
##########
@@ -382,9 +380,7 @@ protected void closeOp(boolean abort) throws HiveException {
     super.closeOp(abort);
     out = null;
     reducerHash = null;
-    if (LOG.isInfoEnabled()) {
-      LOG.info(toString() + ": records written - " + numRows);
-    }
+    LOG.info(this + ": records written - " + numRows);

Review comment:
       {} : records written - {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637383091



##########
File path: llap-client/src/java/org/apache/hadoop/hive/llap/registry/impl/SlotZnode.java
##########
@@ -256,9 +256,7 @@ private void processWatchedEvent(WatchedEvent event) {
   private void processCreateResult(CuratorFramework client, CuratorEvent event) throws Exception {
     boolean doesExist = event.getResultCode() == KeeperException.Code.NODEEXISTS.intValue();
     if (!doesExist && event.getResultCode() != KeeperException.Code.OK.intValue()) {
-      if (LOG.isInfoEnabled()) {
-        LOG.info("Trying to reacquire due to create error: " + event);
-      }
+      LOG.info("Trying to reacquire due to create error: " + event);

Review comment:
       Trying to reacquire due to create error: {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382925



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/RedundantDynamicPruningConditionsRemoval.java
##########
@@ -155,9 +155,7 @@ public Object process(Node nd, Stack<Node> stack, NodeProcessorCtx procCtx, Obje
                 break;
               }
             }
-            if (LOG.isInfoEnabled()) {
-              LOG.info("Dynamic pruning condition removed: " + child);
-            }
+            LOG.info("Dynamic pruning condition removed: " + child);

Review comment:
       Dynamic pruning condition removed: {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] pgaref commented on a change in pull request #2310: HIVE-25152: Remove Superfluous Logging Code

Posted by GitBox <gi...@apache.org>.
pgaref commented on a change in pull request #2310:
URL: https://github.com/apache/hive/pull/2310#discussion_r637382760



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/io/HiveInputFormat.java
##########
@@ -313,17 +307,13 @@ public void configure(JobConf job) {
 
   public static boolean checkInputFormatForLlapEncode(Configuration conf, String ifName) {
     String formatList = HiveConf.getVar(conf, ConfVars.LLAP_IO_ENCODE_FORMATS);
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("Checking " + ifName + " against " + formatList);
-    }
+    LOG.debug("Checking {} against {}", ifName, formatList);
     String[] formats = StringUtils.getStrings(formatList);
     if (formats != null) {
       for (String format : formats) {
         // TODO: should we check isAssignableFrom?
         if (ifName.equals(format)) {
-          if (LOG.isInfoEnabled()) {
-            LOG.info("Using SerDe-based LLAP reader for " + ifName);
-          }
+          LOG.info("Using SerDe-based LLAP reader for " + ifName);

Review comment:
       Using SerDe-based LLAP reader for {}




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org