From abbd95b790c1a7adcd94f6a8527cbcb879289269 Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Tue, 30 Aug 2016 10:43:20 -0700 Subject: [PATCH] HDFS-10760. DataXceiver#run() should not log InvalidToken exception as an error. Contributed by Pan Yuxuan. (cherry picked from commit c4ee6915a14e00342755d7cdcbf2d61518f306aa) --- .../org/apache/hadoop/hdfs/server/datanode/DataXceiver.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java index c5cc36cea03..7c36ab19c88 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java @@ -311,6 +311,12 @@ class DataXceiver extends Receiver implements Runnable { } else { LOG.info(s1 + "; " + t); } + } else if (t instanceof InvalidToken) { + // The InvalidToken exception has already been logged in + // checkAccess() method and this is not a server error. + if (LOG.isTraceEnabled()) { + LOG.trace(s, t); + } } else { LOG.error(s, t); }