From 56257fab1d5a7f66bebd9149c7df0436c0a57adb Mon Sep 17 00:00:00 2001 From: Colin Patrick Mccabe Date: Wed, 5 Nov 2014 10:51:49 -0800 Subject: [PATCH] HDFS-7199. DFSOutputStream should not silently drop data if DataStreamer crashes with an unchecked exception (rushabhs via cmccabe) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4a120e91ab1..cf9616b54d7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -397,6 +397,9 @@ Release 2.7.0 - UNRELEASED HDFS-7324. haadmin command usage prints incorrect command name. (Brahma Reddy Battula via suresh) + HDFS-7199. DFSOutputStream should not silently drop data if DataStreamer + crashes with an unchecked exception (rushabhs via cmccabe) + Release 2.6.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java index 0e1f206872c..17942f263c5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java @@ -692,6 +692,8 @@ public class DFSOutputStream extends FSOutputSummer } if (e instanceof IOException) { setLastException((IOException)e); + } else { + setLastException(new IOException("DataStreamer Exception: ",e)); } hasError = true; if (errorIndex == -1 && restartingNodeIndex == -1) {