[ 
https://issues.apache.org/jira/browse/MAPREDUCE-7368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shilun Fan updated MAPREDUCE-7368:
----------------------------------
         Component/s: mrv2
        Hadoop Flags: Reviewed
    Target Version/s: 3.3.1, 3.4.0

> 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
>          Components: mrv2
>    Affects Versions: 3.3.1
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0
>
>          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.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-h...@hadoop.apache.org

Reply via email to