HDFS-14262. [SBN read] Make Log.WARN message in GlobalStateIdContext more informative. Contributed by Shweta Yakkali.

This commit is contained in:
Shweta Yakkali 2019-02-14 00:22:13 -08:00 committed by Konstantin V Shvachko
parent a3b9b955be
commit 56e2ad2dce
1 changed files with 4 additions and 2 deletions

View File

@ -149,8 +149,10 @@ class GlobalStateIdContext implements AlignmentContext {
if (clientStateId > serverStateId && if (clientStateId > serverStateId &&
HAServiceState.ACTIVE.equals(namesystem.getState())) { HAServiceState.ACTIVE.equals(namesystem.getState())) {
FSNamesystem.LOG.warn("A client sent stateId: " + clientStateId + FSNamesystem.LOG.warn("The client stateId: "
", but server state is: " + serverStateId); + clientStateId + " is greater than the server stateId: "
+ serverStateId + " This is unexpected. "
+ "Resetting client stateId to server stateId");
return serverStateId; return serverStateId;
} }
if (HAServiceState.OBSERVER.equals(namesystem.getState()) && if (HAServiceState.OBSERVER.equals(namesystem.getState()) &&