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: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to