[ https://issues.apache.org/jira/browse/MAPREDUCE-7368?focusedWorklogId=682728&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-682728 ]
ASF GitHub Bot logged work on MAPREDUCE-7368: --------------------------------------------- Author: ASF GitHub Bot Created on: 17/Nov/21 16:20 Start Date: 17/Nov/21 16:20 Worklog Time Spent: 10m Work Description: zabetak opened a new pull request #3671: URL: https://github.com/apache/hadoop/pull/3671 ### Description of PR When the exception is caught and printed (instead of propagated) the consumer has no way to tell write failed. This hides the failure and leads to problems which are difficult to debug and at the same time can cause data corruption. More details in the JIRA MAPREDUCE-7368. ### How was this patch tested? Writing a well-contained test is not easy at the same time the change is straightforward so it may not be necessary. ### For code changes: - [ ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 682728) Remaining Estimate: 0h Time Spent: 10m > 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 > Time Spent: 10m > 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