You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "simbadzina (via GitHub)" <gi...@apache.org> on 2023/11/15 20:48:23 UTC
Re: [PR] HDFS-17232. RBF: Fix NoNamenodesAvailableException for a long time, when use observer. [hadoop]
simbadzina commented on code in PR #6208:
URL: https://github.com/apache/hadoop/pull/6208#discussion_r1394778522
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java:
##########
@@ -772,13 +780,22 @@ public static boolean isUnavailableException(IOException ioe) {
* Check if the cluster of given nameservice id is available.
*
* @param nsId nameservice ID.
+ * @param namenode namenode context.
+ * @param listObserverFirst Observer read case, observer NN will be ranked first.
* @return true if the cluster with given nameservice id is available.
* @throws IOException if error occurs.
*/
- private boolean isClusterUnAvailable(String nsId) throws IOException {
+ private boolean isClusterUnAvailable(
+ String nsId, FederationNamenodeContext namenode,
+ boolean listObserverFirst) throws IOException {
+ // Use observer and the namenode that causes the exception is an observer,
+ // false is returned so that the observer can be marked as unavailable,so other observers
+ // or active namenode which is standby in the cache of the router can be retried.
Review Comment:
This comment is a bit confusing to read. Maybe the following could make it clearer
```
If the operation is an observer read and the namenode that caused the exception is an observer ...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org