Skip to content

Commit 5ae1222

Browse files
committed
Update DBOutputFormat.java
1 parent e66eb38 commit 5ae1222

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ public void close(TaskAttemptContext context) throws IOException {
100100
catch (SQLException ex) {
101101
LOG.warn(StringUtils.stringifyException(ex));
102102
}
103-
throw new IOException(e.getMessage());
103+
throw new IOException(e);
104104
} finally {
105105
try {
106106
statement.close();
107107
connection.close();
108108
}
109109
catch (SQLException ex) {
110-
throw new IOException(ex.getMessage());
110+
throw new IOException(ex);
111111
}
112112
}
113113
}
@@ -182,7 +182,7 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
182182
constructQuery(tableName, fieldNames));
183183
return new DBRecordWriter(connection, statement);
184184
} catch (Exception ex) {
185-
throw new IOException(ex.getMessage());
185+
throw new IOException(ex);
186186
}
187187
}
188188

0 commit comments

Comments
 (0)