Updated Branches: refs/heads/branch-1.99.3 15c4f80d7 -> 066f98aee
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/066f98ae Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/066f98ae Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/066f98ae Branch: refs/heads/branch-1.99.3 Commit: 066f98aee04142e30abe7842b6d0a00e40677307 Parents: 15c4f80 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:40:38 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/066f98ae/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(); + } } }
