[jira] [Commented] (MAPREDUCE-7368) DBOutputFormat.DBRecordWriter#write must throw exception when it fails
[ https://issues.apache.org/jira/browse/MAPREDUCE-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17455168#comment-17455168 ] Ayush Saxena commented on MAPREDUCE-7368: - Committed to trunk. Thanx [~zabetak] for the contribution!!! **Added [~zabetak] to MAPREDUCE Contributors-1 group to assign the jira. > DBOutputFormat.DBRecordWriter#write must throw exception when it fails > -- > > Key: MAPREDUCE-7368 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7368 > Project: Hadoop Map/Reduce > Issue Type: Bug >Affects Versions: 3.3.1 >Reporter: Stamatis Zampetakis >Assignee: Stamatis Zampetakis >Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > When the > [DBRecordWriter#write|https://github.com/apache/hadoop/blob/91af256a5b44925e5dfdf333293251a19685ba2a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java#L120] > fails with an {{SQLException}} the problem is not propagated but printed in > {{System.err}} instead. > {code:java} > public void write(K key, V value) throws IOException { > try { > key.write(statement); > statement.addBatch(); > } catch (SQLException e) { > e.printStackTrace(); > } > } > {code} > The consumer of this API has no way to tell that the write failed. Moreover, > the exception is not present in the logs which makes the problem very hard > debug and can easily lead to data corruption since clients can easily assume > that everything went well. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org
[jira] [Commented] (MAPREDUCE-7368) DBOutputFormat.DBRecordWriter#write must throw exception when it fails
[ https://issues.apache.org/jira/browse/MAPREDUCE-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17445328#comment-17445328 ] Stamatis Zampetakis commented on MAPREDUCE-7368: One example showing the impact of this can be seen in HIVE-25717. The problem can easily go unnoticed when the exception is not propagated. > DBOutputFormat.DBRecordWriter#write must throw exception when it fails > -- > > Key: MAPREDUCE-7368 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-7368 > Project: Hadoop Map/Reduce > Issue Type: Bug >Affects Versions: 3.3.1 >Reporter: Stamatis Zampetakis >Priority: Major > > When the > [DBRecordWriter#write|https://github.com/apache/hadoop/blob/91af256a5b44925e5dfdf333293251a19685ba2a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/db/DBOutputFormat.java#L120] > fails with an {{SQLException}} the problem is not propagated but printed in > {{System.err}} instead. > {code:java} > public void write(K key, V value) throws IOException { > try { > key.write(statement); > statement.addBatch(); > } catch (SQLException e) { > e.printStackTrace(); > } > } > {code} > The consumer of this API has no way to tell that the write failed. Moreover, > the exception is not present in the logs which makes the problem very hard > debug and can easily lead to data corruption since clients can easily assume > that everything went well. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org