jmark99 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_r157088784
########## 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: I had not thought of the public api implications when refactoring. I was trying to consolidate some code. I can revert the functionality back into TableOperations and then add a separate check within NewTableConfiguration or create a static method in TableOperationsHelper as @keith-turner suggested for the checkIteratorConflict method. Thoughts? ---------------------------------------------------------------- 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