|
26 | 26 | import org.apache.hadoop.classification.InterfaceAudience;
|
27 | 27 | import org.apache.hadoop.classification.InterfaceStability;
|
28 | 28 | import org.apache.hadoop.ha.HAServiceProtocol.HAServiceState;
|
29 |
| -import org.apache.hadoop.hdfs.DFSConfigKeys; |
30 | 29 | import org.apache.hadoop.hdfs.protocol.ClientProtocol;
|
31 | 30 | import org.apache.hadoop.hdfs.server.namenode.ha.ObserverReadProxyProvider;
|
32 | 31 | import org.apache.hadoop.hdfs.server.namenode.ha.ReadOnly;
|
@@ -158,18 +157,9 @@ public long receiveRequestState(RpcRequestHeaderProto header,
|
158 | 157 | ESTIMATED_TRANSACTIONS_PER_SECOND
|
159 | 158 | * TimeUnit.MILLISECONDS.toSeconds(clientWaitTime)
|
160 | 159 | * ESTIMATED_SERVER_TIME_MULTIPLIER) {
|
161 |
| - if (namesystem.isRetryActive()) { |
162 |
| - String message = "Retrying to Active NameNode, Observer Node is too far behind: serverStateId = " + serverStateId + " clientStateId = " + clientStateId; |
163 |
| - FSNamesystem.LOG.warn(message); |
164 |
| - throw new ObserverRetryOnActiveException(message); |
165 |
| - } else { |
166 |
| - throw new RetriableException( |
167 |
| - String.format( |
168 |
| - "%s is not enabled, Continue Retrying to Observer NameNode, Observer Node is too far behind: serverStateId = %d clientStateId = %d", |
169 |
| - DFSConfigKeys.DFS_NAMENODE_OBSERVER_TOO_STALE_RETRY_ACTIVE_ENABLE, |
170 |
| - serverStateId, clientStateId |
171 |
| - )); |
172 |
| - } |
| 160 | + throw new ObserverRetryOnActiveException("Retrying to Active NameNode, Observer Node is too" |
| 161 | + + " far behind: serverStateId = " + serverStateId |
| 162 | + + " clientStateId = " + clientStateId); |
173 | 163 | }
|
174 | 164 | return clientStateId;
|
175 | 165 | }
|
|
0 commit comments