ctubbsii commented on a change in pull request #337: ACCUMULO-4732 No APIs to configure iterators or locality groups for new tables URL: https://github.com/apache/accumulo/pull/337#discussion_r157092650
########## File path: core/src/main/java/org/apache/accumulo/core/util/LocalityGroupUtil.java ########## @@ -340,4 +340,14 @@ public static void seek(FileSKVIterator reader, Range range, String lgName, Map< reader.seek(range, families, inclusive); } + + static public void ensureNonOverlappingGroups(Map<String,Set<Text>> groups) { + HashSet<Text> all = new HashSet<>(); + for (Entry<String,Set<Text>> entry : groups.entrySet()) { + if (!Collections.disjoint(all, entry.getValue())) { + throw new IllegalArgumentException("Group " + entry.getKey() + " overlaps with another group"); + } + all.addAll(entry.getValue()); + } + } Review comment: Oh, my mistake. I thought this was `o.a.a.core.client.util`; it's actually `o.a.a.core.util`, which is not public API. Never mind :smile: ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services