FAQ
Repository: hive
Updated Branches:
   refs/heads/master d469e6110 -> d3a5f20b4


HIVE-13325: Excessive logging when ORC PPD fails type conversions (Prasanth Jayachandran reviewed by Gopal V)


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

Branch: refs/heads/master
Commit: d3a5f20b4487e241b3e9424d1d762dfca0c25d2f
Parents: d469e61
Author: Prasanth Jayachandran <prasanthj@apache.org>
Authored: Thu Mar 24 13:30:55 2016 -0500
Committer: Prasanth Jayachandran <prasanthj@apache.org>
Committed: Thu Mar 24 13:31:08 2016 -0500

----------------------------------------------------------------------
  .../hadoop/hive/ql/io/orc/RecordReaderImpl.java | 15 ++++++++++++---
  1 file changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/d3a5f20b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
index d511df6..aa835ae 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
@@ -378,9 +378,9 @@ public class RecordReaderImpl implements RecordReader {
      }

      TruthValue result;
+ Object baseObj = predicate.getLiteral();
      try {
        // Predicate object and stats objects are converted to the type of the predicate object.
- Object baseObj = predicate.getLiteral();
        Object minValue = getBaseObjectForComparison(predicate.getType(), min);
        Object maxValue = getBaseObjectForComparison(predicate.getType(), max);
        Object predObj = getBaseObjectForComparison(predicate.getType(), baseObj);
@@ -392,8 +392,17 @@ public class RecordReaderImpl implements RecordReader {
        // in case failed conversion, return the default YES_NO_NULL truth value
      } catch (Exception e) {
        if (LOG.isWarnEnabled()) {
- LOG.warn("Exception when evaluating predicate. Skipping ORC PPD." +
- " Exception: " + ExceptionUtils.getStackTrace(e));
+ final String statsType = min == null ?
+ (max == null ? "null" : max.getClass().getSimpleName()) :
+ min.getClass().getSimpleName();
+ final String predicateType = baseObj == null ? "null" : baseObj.getClass().getSimpleName();
+ final String reason = e.getClass().getSimpleName() + " when evaluating predicate." +
+ " Skipping ORC PPD." +
+ " Exception: " + e.getMessage() +
+ " StatsType: " + statsType +
+ " PredicateType: " + predicateType;
+ LOG.warn(reason);
+ LOG.debug(reason, e);
        }
        if (predicate.getOperator().equals(PredicateLeaf.Operator.NULL_SAFE_EQUALS) || !hasNull) {
          result = TruthValue.YES_NO;

Search Discussions

  • Prasanthj at Mar 24, 2016 at 6:35 pm
    Repository: hive
    Updated Branches:
       refs/heads/branch-1 8fc708b87 -> db2efe42a


    HIVE-13325: Excessive logging when ORC PPD fails type conversions (Prasanth Jayachandran reviewed by Gopal V)


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

    Branch: refs/heads/branch-1
    Commit: db2efe42af51f1556daab8bf4feb52111553a641
    Parents: 8fc708b
    Author: Prasanth Jayachandran <prasanthj@apache.org>
    Authored: Thu Mar 24 13:30:55 2016 -0500
    Committer: Prasanth Jayachandran <prasanthj@apache.org>
    Committed: Thu Mar 24 13:31:52 2016 -0500

    ----------------------------------------------------------------------
      .../hadoop/hive/ql/io/orc/RecordReaderImpl.java | 15 ++++++++++++---
      1 file changed, 12 insertions(+), 3 deletions(-)
    ----------------------------------------------------------------------


    http://git-wip-us.apache.org/repos/asf/hive/blob/db2efe42/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
    ----------------------------------------------------------------------
    diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
    index 44cac68..a21a298 100644
    --- a/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
    +++ b/ql/src/java/org/apache/hadoop/hive/ql/io/orc/RecordReaderImpl.java
    @@ -385,9 +385,9 @@ class RecordReaderImpl implements RecordReader {
          }

          TruthValue result;
    + Object baseObj = predicate.getLiteral();
          try {
            // Predicate object and stats objects are converted to the type of the predicate object.
    - Object baseObj = predicate.getLiteral();
            Object minValue = getBaseObjectForComparison(predicate.getType(), min);
            Object maxValue = getBaseObjectForComparison(predicate.getType(), max);
            Object predObj = getBaseObjectForComparison(predicate.getType(), baseObj);
    @@ -399,8 +399,17 @@ class RecordReaderImpl implements RecordReader {
            // in case failed conversion, return the default YES_NO_NULL truth value
          } catch (Exception e) {
            if (LOG.isWarnEnabled()) {
    - LOG.warn("Exception when evaluating predicate. Skipping ORC PPD." +
    - " Exception: " + ExceptionUtils.getStackTrace(e));
    + final String statsType = min == null ?
    + (max == null ? "null" : max.getClass().getSimpleName()) :
    + min.getClass().getSimpleName();
    + final String predicateType = baseObj == null ? "null" : baseObj.getClass().getSimpleName();
    + final String reason = e.getClass().getSimpleName() + " when evaluating predicate." +
    + " Skipping ORC PPD." +
    + " Exception: " + e.getMessage() +
    + " StatsType: " + statsType +
    + " PredicateType: " + predicateType;
    + LOG.warn(reason);
    + LOG.debug(reason, e);
            }
            if (predicate.getOperator().equals(PredicateLeaf.Operator.NULL_SAFE_EQUALS) || !hasNull) {
              result = TruthValue.YES_NO;

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedMar 24, '16 at 6:31p
activeMar 24, '16 at 6:35p
posts2
users1
websitehive.apache.org

1 user in discussion

Prasanthj: 2 posts

People

Translate

site design / logo © 2021 Grokbase