fengnanli commented on a change in pull request #2910:
URL: https://github.com/apache/hadoop/pull/2910#discussion_r621412490
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/metrics/TestMetricsBase.java
##########
@@ -259,4 +259,15 @@ private MembershipState createRegistration(String ns,
String nn,
assertTrue(response.getResult());
return record;
}
+
+ // refresh namenode registration for new attributes
+ public boolean refreshNamenodeRegistration(NamenodeHeartbeatRequest request)
+ throws IOException {
+ boolean result = membershipStore.namenodeHeartbeat(request).getResult();
+ membershipStore.loadCache(true);
+ MembershipNamenodeResolver resolver =
+ (MembershipNamenodeResolver) router.getNamenodeResolver();
+ resolver.loadCache(true);
+ return result;
Review comment:
I think the validation is still useful so kept the returning result.
Also added an assert for the result.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]