From bface2ac6ce2750c438a46c5742e875a1491515c Mon Sep 17 00:00:00 2001 From: Stamatis Zampetakis Date: Wed, 8 Dec 2021 12:10:11 +0100 Subject: [PATCH] MAPREDUCE-7368. DBOutputFormat.DBRecordWriter#write must throw exception when it fails. (#3671). Contributed by Stamatis Zampetakis. Signed-off-by: Ayush Saxena --- .../java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b6f151ac90..764f31d635 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 @@ -122,7 +122,7 @@ public void write(K key, V value) throws IOException { key.write(statement); statement.addBatch(); } catch (SQLException e) { - e.printStackTrace(); + throw new IOException("Failed to execute SQL statement for key " + key, e); } } }