HDFS-12264. DataNode uses a deprecated method IoUtils#cleanup. Contributed by Ajay Yadav.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2906c494 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2906c494 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2906c494 Branch: refs/heads/branch-2 Commit: 2906c494c593f2138813b8b958be24e5b6a5d816 Parents: e18415a Author: Arpit Agarwal <[email protected]> Authored: Mon Aug 7 15:05:10 2017 -0700 Committer: Arpit Agarwal <[email protected]> Committed: Mon Aug 7 15:33:36 2017 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/io/IOUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2906c494/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java index 6142cd6..03c488c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/IOUtils.java @@ -293,7 +293,9 @@ public class IOUtils { * @param stream the Stream to close */ public static void closeStream(java.io.Closeable stream) { - cleanup(null, stream); + if (stream != null) { + cleanupWithLogger(null, stream); + } } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
