+ private static ListMultimap<String, String> createModuleNameToShardName(Iterable<ModuleShard> moduleShards) {
+ final com.google.common.collect.ImmutableListMultimap.Builder<String, String> b = ImmutableListMultimap.builder();
+
+ for (ModuleShard m : moduleShards) {
+ for (Shard s : m.getShards()) {
+ b.put(m.getModuleName(), s.getName());
+ }
+ }
+
+ return b.build();
+ }
+