Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 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;
 }