From 9850827c245d9ac425e27f3ead7cc1aa3e43924a Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Mon, 26 Oct 2015 15:15:03 -0700 Subject: [PATCH] HDFS-9284. fsck command should not print exception trace when file not found. Contributed by Jagadesh Kiran N. (cherry picked from commit 677a936bf759515ac94d9accb9bf5364f688d051) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index ebd017d0bd8..7d408f74469 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -737,6 +737,9 @@ Release 2.8.0 - UNRELEASED BlockInfoUnderConstruction#setGenerationStampAndVerifyReplicas. (Wei-Chiu Chuang via Yongjun Zhang) + HDFS-9284. fsck command should not print exception trace when file not + found. (Jagadesh Kiran N via wang) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java index f12c4f6d8a2..024b7350c8b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSck.java @@ -41,7 +41,6 @@ import org.apache.hadoop.hdfs.web.URLConnectionFactory; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.authentication.client.AuthenticationException; -import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; @@ -315,7 +314,7 @@ else if (args[idx].equals("-list-corruptfileblocks")) { namenodeAddress = getCurrentNamenodeAddress(dirpath); } catch (IOException ioe) { System.err.println("FileSystem is inaccessible due to:\n" - + StringUtils.stringifyException(ioe)); + + ioe.toString()); } if (namenodeAddress == null) {