소스 검색

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

Shweta Yakkali 6 년 전
부모
커밋
080a421911
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/GlobalStateIdContext.java

+ 4 - 2
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()) &&