saintstack commented on a change in pull request #2652:
URL: https://github.com/apache/hbase/pull/2652#discussion_r523179798



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestZKConnectionRegistry.java
##########
@@ -125,4 +127,20 @@ public void testNoMetaAvailable() throws 
InterruptedException {
       }
     }
   }
+
+  /**
+   * Pass discontinuous list of znodes to registry getMetaRegionLocation. 
Should work fine.
+   * It used to throw ArrayOutOfBoundsException. See HBASE-25280.
+   */
+  @Test
+  public void testDiscontinuousLocations() throws ExecutionException, 
InterruptedException {
+    Configuration conf = new Configuration(TEST_UTIL.getConfiguration());
+    try (ZKConnectionRegistry registry = new ZKConnectionRegistry(conf)) {
+      CompletableFuture<RegionLocations> cf = new CompletableFuture<>();
+      List<String> znodes = Arrays.asList(
+        new String[] { ZNodePaths.META_ZNODE_PREFIX, 
ZNodePaths.META_ZNODE_PREFIX + "_003" });
+      registry.getMetaRegionLocation(cf, znodes);

Review comment:
       Done




----------------------------------------------------------------
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]


Reply via email to