[
https://issues.apache.org/jira/browse/HDFS-17324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803632#comment-17803632
]
ASF GitHub Bot commented on HDFS-17324:
---------------------------------------
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.
> RBF: Router should not return nameservices that not enable observer read in
> RpcResponseHeaderProto
> --------------------------------------------------------------------------------------------------
>
> Key: HDFS-17324
> URL: https://issues.apache.org/jira/browse/HDFS-17324
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: liuguanghua
> Assignee: liuguanghua
> Priority: Major
> Labels: pull-request-available
>
> {color:#172b4d}Router Observer Read is controled by
> RBFConfigKeys.DFS_ROUTER_OBSERVER_READ_DEFAULT_KEY and
> RBFConfigKeys.DFS_ROUTER_OBSERVER_READ_OVERRIDES.{color}
> {color:#172b4d}If nameservice is not enable for observer read in Router,
> RpcResponseHeaderProto in Router should not return it.{color}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]