public Map<HRegionInfo, ServerName> getResultMap(final AssignmentConfig original) { final Map<HRegionInfo, ServerName> result = Maps.newHashMap(); for (final RegionAssignment assignment : difference(original)) { result.put(assignment.getRegionStats().getRegionInfo(), assignment.getNewServer()); } return result; }
public Multimap<ServerName, RegionStats> getAssignmentsByServer() { if (memoizedIndex != null) return memoizedIndex; memoizedIndex = ArrayListMultimap.create(); for (final RegionAssignment assignment : getAssignments()) { memoizedIndex.put(assignment.getNewServer(), assignment.getRegionStats()); } return memoizedIndex; }