ZanderXu commented on PR #5123:
URL: https://github.com/apache/hadoop/pull/5123#issuecomment-1312352584
@tomscut Sir, thanks for your review.
> Class
org.apache.hadoop.hdfs.federation.protocol.proto.HdfsServerFederationProtos$RouterFederatedStateProto
defines non-transient non-serializable instance field namespaceStateIds_
I just renamed FederationProtocol.proto from hadoop-hdfs-rbf to
hadoop-hdfs-client, and didn't modify any content.
>
org.apache.hadoop.hdfs.ClientGSIContext.mergeRouterFederatedState(ByteString)
makes inefficient use of keySet iterator instead of entrySet iterator
I think this check is imprecise, because the key will be used. The related
code as bellows:
```
for (String ns : remoteMapping.keySet()) {
// Warning here.
long remoteValue = remoteMapping.get(ns);
long localValue = localMapping.getOrDefault(ns, 0L);
localMapping.put(ns, Math.max(remoteValue, localValue));
}
```
Do you have some good suggestions?
--
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]