Update DBOutputFormat.java
This commit is contained in:
parent
e66eb382b1
commit
5ae1222f83
|
@ -100,14 +100,14 @@ extends OutputFormat<K,V> {
|
||||||
catch (SQLException ex) {
|
catch (SQLException ex) {
|
||||||
LOG.warn(StringUtils.stringifyException(ex));
|
LOG.warn(StringUtils.stringifyException(ex));
|
||||||
}
|
}
|
||||||
throw new IOException(e.getMessage());
|
throw new IOException(e);
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
statement.close();
|
statement.close();
|
||||||
connection.close();
|
connection.close();
|
||||||
}
|
}
|
||||||
catch (SQLException ex) {
|
catch (SQLException ex) {
|
||||||
throw new IOException(ex.getMessage());
|
throw new IOException(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ extends OutputFormat<K,V> {
|
||||||
constructQuery(tableName, fieldNames));
|
constructQuery(tableName, fieldNames));
|
||||||
return new DBRecordWriter(connection, statement);
|
return new DBRecordWriter(connection, statement);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new IOException(ex.getMessage());
|
throw new IOException(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue