ctubbsii commented on code in PR #5436: URL: https://github.com/apache/accumulo/pull/5436#discussion_r2021925238
########## test/src/main/java/org/apache/accumulo/test/functional/BulkNewMetadataSkipIT.java: ########## @@ -153,6 +153,15 @@ public void test(int skipDistance) throws Exception { hashes.get(row(i)).add(h4); } + // create data that skips 0,1,2,..,9 tablets + int[] h5Rows = new int[] {50, 50 + 1, 50 + 1 + 2, 50 + 1 + 2 + 3, 50 + 1 + 2 + 3 + 4, + 50 + 1 + 2 + 3 + 4 + 5, 50 + 1 + 2 + 3 + 4 + 5 + 6, 50 + 1 + 2 + 3 + 4 + 5 + 6 + 7, + 50 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8, 50 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9}; + String h5 = writeNonContiguousData(fs, dir + "/f5.", aconf, h5Rows); + for (int i : h5Rows) { + hashes.get(row(i)).add(h5); + } + Review Comment: This could be more succinctly written as: ```java var gap = new AtomicInteger(0); int[] h5Rows = IntStream.iterate(50, i -> gap.get() < 10, i -> i + gap.incrementAndGet()).toArray(); ``` The iterate predicate could also be `i -> i < 100` in this case, but if your goal is to track the gap size, it makes more sense to make sure the gap size is smaller than 10. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org