From 080a421911edf59eba388199b81c1b4b05379ab3 Mon Sep 17 00:00:00 2001 From: Shweta Yakkali Date: Thu, 14 Feb 2019 00:22:13 -0800 Subject: [PATCH] HDFS-14262. [SBN read] Make Log.WARN message in GlobalStateIdContext more informative. Contributed by Shweta Yakkali. --- .../hadoop/hdfs/server/namenode/GlobalStateIdContext.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java index a8c7141f05b..9f3a135336b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java @@ -129,8 +129,10 @@ class GlobalStateIdContext implements AlignmentContext { long clientStateId = header.getStateId(); if (clientStateId > serverStateId && HAServiceState.ACTIVE.equals(namesystem.getState())) { - FSNamesystem.LOG.warn("A client sent stateId: " + clientStateId + - ", but server state is: " + serverStateId); + FSNamesystem.LOG.warn("The client stateId: {} is greater than " + + "the server stateId: {} This is unexpected. " + + "Resetting client stateId to server stateId", + clientStateId, serverStateId); return serverStateId; } if (HAServiceState.OBSERVER.equals(namesystem.getState()) &&