Updated Branches: refs/heads/sqoop2 0a5a80cbf -> 1ce0923b6
SQOOP-1210: Exporting data with malformed records causes sqoop2 jobs to hang until killed or they timeout (Venkat Ranganathan via Jarek Jarcec Cecho) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/1ce0923b Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/1ce0923b Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/1ce0923b Branch: refs/heads/sqoop2 Commit: 1ce0923b66cfef6e7bbccec828e4e3e72e6870ba Parents: 0a5a80c Author: Jarek Jarcec Cecho <[email protected]> Authored: Wed Oct 2 09:14:31 2013 -0700 Committer: Jarek Jarcec Cecho <[email protected]> Committed: Wed Oct 2 09:14:31 2013 -0700 ---------------------------------------------------------------------- .../sqoop/job/mr/SqoopOutputFormatLoadExecutor.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/1ce0923b/execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java ---------------------------------------------------------------------- diff --git a/execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java b/execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java index 739eb17..7dedee9 100644 --- a/execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java +++ b/execution/mapreduce/src/main/java/org/apache/sqoop/job/mr/SqoopOutputFormatLoadExecutor.java @@ -166,9 +166,16 @@ public class SqoopOutputFormatLoadExecutor { if (writerFinished) { return null; } - Object content = data.getContent(type); - free.release(); - return content; + try { + Object content = data.getContent(type); + return content; + } catch (Throwable t) { + readerFinished = true; + LOG.error("Caught exception e while getting content ", t); + throw new SqoopException(MapreduceExecutionError.MAPRED_EXEC_0018, t); + } finally { + free.release(); + } } }
