You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by dk...@apache.org on 2024/04/15 08:10:24 UTC

(hive) branch master updated: HIVE-28133: Log the original exception in HiveIOExceptionHandlerUtil#handleRecordReaderException (Denys Kuzmenko, reviewed by Laszlo Bodor)

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

dkuzmenko 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 a3e5298cb01 HIVE-28133: Log the original exception in HiveIOExceptionHandlerUtil#handleRecordReaderException (Denys Kuzmenko, reviewed by Laszlo Bodor)
a3e5298cb01 is described below

commit a3e5298cb01a9439227e6ea65a818f363ccbdef2
Author: Denys Kuzmenko <de...@gmail.com>
AuthorDate: Mon Apr 15 11:10:17 2024 +0300

    HIVE-28133: Log the original exception in HiveIOExceptionHandlerUtil#handleRecordReaderException (Denys Kuzmenko, reviewed by Laszlo Bodor)
    
    Closes #5139
---
 .../java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerUtil.java  | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerUtil.java b/shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerUtil.java
index 4a774004e43..c9338ef3f21 100644
--- a/shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerUtil.java
+++ b/shims/common/src/main/java/org/apache/hadoop/hive/io/HiveIOExceptionHandlerUtil.java
@@ -21,9 +21,13 @@ import java.io.IOException;
 
 import org.apache.hadoop.mapred.JobConf;
 import org.apache.hadoop.mapred.RecordReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class HiveIOExceptionHandlerUtil {
 
+  private static final Logger LOG = LoggerFactory.getLogger(HiveIOExceptionHandlerUtil.class.getName());
+
   private static final ThreadLocal<HiveIOExceptionHandlerChain> handlerChainInstance =
     new ThreadLocal<HiveIOExceptionHandlerChain>();
 
@@ -52,6 +56,7 @@ public class HiveIOExceptionHandlerUtil {
    */
   public static RecordReader handleRecordReaderCreationException(Exception e,
       JobConf job) throws IOException {
+    LOG.error("RecordReader#init() threw an exception: ", e);
     HiveIOExceptionHandlerChain ioExpectionHandlerChain = get(job);
     if (ioExpectionHandlerChain != null) {
       return ioExpectionHandlerChain.handleRecordReaderCreationException(e);
@@ -72,6 +77,7 @@ public class HiveIOExceptionHandlerUtil {
    */
   public static boolean handleRecordReaderNextException(Exception e, JobConf job)
       throws IOException {
+    LOG.error("RecordReader#next() threw an exception: ", e);
     HiveIOExceptionHandlerChain ioExpectionHandlerChain = get(job);
     if (ioExpectionHandlerChain != null) {
       return ioExpectionHandlerChain.handleRecordReaderNextException(e);