FAQ
Author: navis
Date: Fri Jan 9 04:11:22 2015
New Revision: 1650438

URL: http://svn.apache.org/r1650438
Log:
HIVE-9242 : Many places in CBO code eat exceptions (Navis reviewed by Brock Noland)

Modified:
     hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/InjectableDummyAuthenticator.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/truncate/ColumnTruncateTask.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java
     hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java

Modified: hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/InjectableDummyAuthenticator.java
URL: http://svn.apache.org/viewvc/hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/InjectableDummyAuthenticator.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/InjectableDummyAuthenticator.java (original)
+++ hive/trunk/itests/util/src/main/java/org/apache/hadoop/hive/ql/security/InjectableDummyAuthenticator.java Fri Jan 9 04:11:22 2015
@@ -82,12 +82,9 @@ public class InjectableDummyAuthenticato
    public void setConf(Configuration config) {
      try {
        hmap = hmapClass.newInstance();
- } catch (InstantiationException e) {
+ } catch (Exception e) {
        throw new RuntimeException("Whoops, could not create an Authenticator of class " +
- hmapClass.getName());
- } catch (IllegalAccessException e) {
- throw new RuntimeException("Whoops, could not create an Authenticator of class " +
- hmapClass.getName());
+ hmapClass.getName(), e);
      }

      hmap.setConf(config);

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecDriver.java Fri Jan 9 04:11:22 2015
@@ -242,7 +242,7 @@ public class ExecDriver extends Task<Map
        job.setPartitionerClass((Class<? extends Partitioner>) (Class.forName(HiveConf.getVar(job,
            HiveConf.ConfVars.HIVEPARTITIONER))));
      } catch (ClassNotFoundException e) {
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e.getMessage(), e);
      }

      if (mWork.getNumMapTasks() != null) {
@@ -288,7 +288,7 @@ public class ExecDriver extends Task<Map
      try {
        job.setInputFormat((Class<? extends InputFormat>) (Class.forName(inpFormat)));
      } catch (ClassNotFoundException e) {
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e.getMessage(), e);
      }



Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/CustomPartitionVertex.java Fri Jan 9 04:11:22 2015
@@ -234,7 +234,7 @@ public class CustomPartitionVertex exten
          try {
            fileSplit = getFileSplitFromEvent(diEvent);
          } catch (IOException e) {
- throw new RuntimeException("Failed to get file split for event: " + diEvent);
+ throw new RuntimeException("Failed to get file split for event: " + diEvent, e);
          }
          Set<FileSplit> fsList =
              pathFileSplitsMap.get(Utilities.getBucketFileNameFromPathSubString(fileSplit.getPath()

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DagUtils.java Fri Jan 9 04:11:22 2015
@@ -578,7 +578,7 @@ public class DagUtils {
          }
        } catch (IOException e) {
          throw new RuntimeException(
- "Can't make path " + outputPath + " : " + e.getMessage());
+ "Can't make path " + outputPath + " : " + e.getMessage(), e);
        }
      }


Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToString.java Fri Jan 9 04:11:22 2015
@@ -20,7 +20,6 @@ package org.apache.hadoop.hive.ql.exec.v

  import org.apache.hadoop.hive.ql.exec.vector.BytesColumnVector;
  import org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector;
-import org.apache.hadoop.hive.ql.exec.vector.expressions.DecimalToStringUnaryUDF;

  /**
   * To support vectorized cast of decimal to string.
@@ -49,9 +48,8 @@ public class CastDecimalToString extends
      try {
        b = s.getBytes("UTF-8");
      } catch (Exception e) {
-
        // This should never happen. If it does, there is a bug.
- throw new RuntimeException("Internal error: unable to convert decimal to string");
+ throw new RuntimeException("Internal error: unable to convert decimal to string", e);
      }
      assign(outV, i, b, b.length);
    }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/udf/VectorUDFArgDesc.java Fri Jan 9 04:11:22 2015
@@ -18,7 +18,6 @@

  package org.apache.hadoop.hive.ql.exec.vector.udf;

-import java.io.IOException;
  import java.io.Serializable;

  import org.apache.hadoop.hive.ql.exec.vector.ColumnVector;
@@ -107,7 +106,7 @@ public class VectorUDFArgDesc implements
          o = writers[argPosition].writeValue(cv, row);
          return new GenericUDF.DeferredJavaObject(o);
        } catch (HiveException e) {
- throw new RuntimeException("Unable to get Java object from VectorizedRowBatch");
+ throw new RuntimeException("Unable to get Java object from VectorizedRowBatch", e);
        }
      }
    }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/index/HiveIndexedInputFormat.java Fri Jan 9 04:11:22 2015
@@ -185,7 +185,7 @@ public class HiveIndexedInputFormat exte
          }
        } catch (HiveException e) {
          throw new RuntimeException(
- "Unable to get metadata for input table split" + split.getPath());
+ "Unable to get metadata for input table split" + split.getPath(), e);
        }
      }
      InputSplit retA[] = newSplits.toArray((new FileSplit[newSplits.size()]));

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/write/DataWritableWriter.java Fri Jan 9 04:11:22 2015
@@ -66,8 +66,8 @@ public class DataWritableWriter {
          writeGroupFields(record, schema);
        } catch (RuntimeException e) {
          String errorMessage = "Parquet record is malformed: " + e.getMessage();
- LOG.error(errorMessage);
- throw new RuntimeException(errorMessage);
+ LOG.error(errorMessage, e);
+ throw new RuntimeException(errorMessage, e);
        }
        recordConsumer.endMessage();
      }

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/stats/PartialScanTask.java Fri Jan 9 04:11:22 2015
@@ -51,7 +51,6 @@ import org.apache.hadoop.hive.ql.session
  import org.apache.hadoop.hive.ql.session.SessionState.LogHelper;
  import org.apache.hadoop.hive.ql.stats.StatsFactory;
  import org.apache.hadoop.hive.ql.stats.StatsPublisher;
-import org.apache.hadoop.hive.shims.ShimLoader;
  import org.apache.hadoop.io.NullWritable;
  import org.apache.hadoop.mapred.Counters;
  import org.apache.hadoop.mapred.FileInputFormat;
@@ -148,7 +147,7 @@ public class PartialScanTask extends Tas
        job.setInputFormat((Class<? extends InputFormat>) (Class
            .forName(inpFormat)));
      } catch (ClassNotFoundException e) {
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e.getMessage(), e);
      }

      job.setOutputKeyClass(NullWritable.class);

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/truncate/ColumnTruncateTask.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/truncate/ColumnTruncateTask.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/truncate/ColumnTruncateTask.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/io/rcfile/truncate/ColumnTruncateTask.java Fri Jan 9 04:11:22 2015
@@ -39,7 +39,6 @@ import org.apache.hadoop.hive.ql.io.Hive
  import org.apache.hadoop.hive.ql.plan.MapredWork;
  import org.apache.hadoop.hive.ql.plan.api.StageType;
  import org.apache.hadoop.hive.ql.session.SessionState;
-import org.apache.hadoop.hive.shims.ShimLoader;
  import org.apache.hadoop.io.NullWritable;
  import org.apache.hadoop.mapred.Counters;
  import org.apache.hadoop.mapred.FileInputFormat;
@@ -124,7 +123,7 @@ public class ColumnTruncateTask extends
        job.setInputFormat((Class<? extends InputFormat>) (Class
            .forName(inpFormat)));
      } catch (ClassNotFoundException e) {
- throw new RuntimeException(e.getMessage());
+ throw new RuntimeException(e.getMessage(), e);
      }

      Path outputPath = this.work.getOutputDir();

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/RelOptHiveTable.java Fri Jan 9 04:11:22 2015
@@ -273,8 +273,8 @@ public class RelOptHiveTable extends Rel
            }
          } catch (HiveException e) {
            String logMsg = "Collecting stats failed.";
- LOG.error(logMsg);
- throw new RuntimeException(logMsg);
+ LOG.error(logMsg, e);
+ throw new RuntimeException(logMsg, e);
          }
        }


Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java?rev=1650438&r1=1650437&r2=1650438&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/xml/UDFXPathUtil.java Fri Jan 9 04:11:22 2015
@@ -71,7 +71,7 @@ public class UDFXPathUtil {
      try {
        return expression.evaluate(inputSource, qname);
      } catch (XPathExpressionException e) {
- throw new RuntimeException ("Invalid expression '" + oldPath + "'");
+ throw new RuntimeException ("Invalid expression '" + oldPath + "'", e);
      }
    }

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 9, '15 at 4:11a
activeJan 9, '15 at 4:11a
posts1
users1
websitehive.apache.org

1 user in discussion

Navis: 1 post

People

Translate

site design / logo © 2021 Grokbase