From 5ae1222f834723ff06e1472111174758d53ec444 Mon Sep 17 00:00:00 2001 From: Peeb Date: Tue, 24 Mar 2015 19:30:33 +0800 Subject: [PATCH] Update DBOutputFormat.java --- .../org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java index 2e3a9d8f4fc..4ad3e41ca56 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java @@ -100,14 +100,14 @@ extends OutputFormat { catch (SQLException ex) { LOG.warn(StringUtils.stringifyException(ex)); } - throw new IOException(e.getMessage()); + throw new IOException(e); } finally { try { statement.close(); connection.close(); } catch (SQLException ex) { - throw new IOException(ex.getMessage()); + throw new IOException(ex); } } } @@ -182,7 +182,7 @@ extends OutputFormat { constructQuery(tableName, fieldNames)); return new DBRecordWriter(connection, statement); } catch (Exception ex) { - throw new IOException(ex.getMessage()); + throw new IOException(ex); } }