goiri commented on code in PR #6412:
URL: https://github.com/apache/hadoop/pull/6412#discussion_r1443127143


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java:
##########
@@ -136,9 +136,9 @@ public class RouterRpcClient {
   /** Field separator of CallerContext. */
   private final String contextFieldSeparator;
   /** Observer read enabled. Default for all nameservices. */
-  private final boolean observerReadEnabledDefault;

Review Comment:
   Making these things static is not very good practice.



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterStateIdContext.java:
##########
@@ -86,7 +86,7 @@ public void 
setResponseHeaderState(RpcResponseHeaderProto.Builder headerBuilder)
     }
     RouterFederatedStateProto.Builder builder = 
RouterFederatedStateProto.newBuilder();
     namespaceIdMap.forEach((k, v) -> {
-      if (v.get() != Long.MIN_VALUE) {
+      if ((v.get() != Long.MIN_VALUE) && 
RouterRpcClient.isNamespaceObserverReadEligible(k)) {

Review Comment:
   Are you making all the other stuff static because of this?
   I don't think this is clean.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to