KeeProMise commented on code in PR #5990:
URL: https://github.com/apache/hadoop/pull/5990#discussion_r1314754191
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MembershipNamenodeResolver.java:
##########
@@ -510,6 +510,10 @@ public synchronized void rotateCache(
if
(firstNamenodeContext.getRpcAddress().equals(namenode.getRpcAddress())) {
List<FederationNamenodeContext> rotatedNnContexts = new
ArrayList<>(namenodeContexts);
Collections.rotate(rotatedNnContexts, -1);
+ String firstNamenodeId = namenodeContexts.get(0).getNamenodeId();
+ LOG.info("Rotate cache of pair <ns: {}, observer first: {}>, put
namenode: {} in the " +
+ "first position of the cache and namenode: {} in the last position
of the cache",
+ nsId, listObserversFirst, firstNamenodeId,
namenode.getNamenodeId());
Review Comment:
When we successfully rotate the cache, add a log for people to understand
what's is happening.
--
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]