You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/07/06 07:35:56 UTC
[GitHub] [hadoop] NickyYe commented on a change in pull request #2080: HDFS-15417. RBF: Get the datanode report from cache for federation WebHDFS operations
NickyYe commented on a change in pull request #2080:
URL: https://github.com/apache/hadoop/pull/2080#discussion_r450036164
##########
File path: hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRpc.java
##########
@@ -1777,6 +1777,43 @@ public void testgetGroupsForUser() throws IOException {
assertArrayEquals(group, result);
}
+ @Test
+ public void testGetCachedDatanodeReport() throws Exception {
+ final DatanodeInfo[] datanodeReport =
+ routerProtocol.getDatanodeReport(DatanodeReportType.ALL);
+
+ // We should have 12 nodes in total
+ assertEquals(12, datanodeReport.length);
+
+ // We should be caching this information
+ DatanodeInfo[] datanodeReport1 =
+ routerProtocol.getDatanodeReport(DatanodeReportType.ALL);
+ assertArrayEquals(datanodeReport1, datanodeReport);
+
+ // Add one datanode
+ getCluster().getCluster().startDataNodes(getCluster().getCluster().getConfiguration(0),
Review comment:
Done. Thanks. @sunchao
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org