Update DBOutputFormat.java
This commit is contained in:
parent
e66eb382b1
commit
5ae1222f83
@ -100,14 +100,14 @@ public void close(TaskAttemptContext context) throws IOException {
|
||||
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 @@ public RecordWriter<K, V> getRecordWriter(TaskAttemptContext context)
|
||||
constructQuery(tableName, fieldNames));
|
||||
return new DBRecordWriter(connection, statement);
|
||||
} catch (Exception ex) {
|
||||
throw new IOException(ex.getMessage());
|
||||
throw new IOException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user