From e38e5b56bd0fe5f4d32f040b7d5aa9d9e67a33f1 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Wed, 16 Sep 2015 10:20:24 +0900 Subject: [PATCH] HADOOP-12416. Trash messages should be handled by Logger instead of being delivered on System.out. Contributed by Mingliang Liu. (cherry picked from commit 77aaf4cf7dd344eb094d9c079e5fb993c6696ebf) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/fs/Trash.java | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c5626396967..af036e09f23 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -6,6 +6,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11746. rewrite test-patch.sh (aw) + HADOOP-12416. Trash messages should be handled by Logger instead of being + delivered on System.out. (Mingliang Liu via aajisaka) + NEW FEATURES HADOOP-11226. Add a configuration to set ipc.Client's traffic class with diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java index aae5cf749b4..13d0ec30ee7 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java @@ -94,8 +94,7 @@ public class Trash extends Configured { Trash trash = new Trash(fullyResolvedFs, conf); boolean success = trash.moveToTrash(fullyResolvedPath); if (success) { - System.out.println("Moved: '" + p + "' to trash at: " + - trash.getCurrentTrashDir() ); + LOG.info("Moved: '" + p + "' to trash at: " + trash.getCurrentTrashDir()); } return success; }