if (dest.equals(e.getKey())) continue; migrationsOut.add(new TabletMigration(ke, e.getKey(), dest)); if (numTablets.put(dest, numTablets.get(dest) + 1) > avg) underCapacityTServer.remove(index);
tooMuch.count--; tooLittle.count++; result.add(new TabletMigration(extent, tooMuch.server, tooLittle.server));
LOG.info("Tablet {} is currently outside the bounds of the" + " regex, migrating from {} to {}", ke, e.getKey(), nextTS); migrationsOut.add(new TabletMigration(ke, e.getKey(), nextTS)); if (migrationsOut.size() >= this.maxTServerMigrations) { break;
private void populateMigrations(Set<TServerInstance> current, List<TabletMigration> migrationsOut, Moves moves) { if (moves.size() == 0) { return; } Function<KeyExtent,String> partitioner = getPartitioner(); for (Pair<KeyExtent,Location> entry : getLocationProvider()) { String group = partitioner.apply(entry.getFirst()); Location loc = entry.getSecond(); if (loc.equals(Location.NONE) || !current.contains(loc.getTserverInstance())) { migrationsOut.clear(); return; } TServerInstance dest = moves.removeMove(loc.getTserverInstance(), group); if (dest != null) { migrationsOut.add(new TabletMigration(entry.getFirst(), loc.getTserverInstance(), dest)); if (moves.size() == 0) { break; } } } } }
if (dest.equals(e.getKey())) continue; migrationsOut.add(new TabletMigration(ke, e.getKey(), dest)); if (numTablets.put(dest, numTablets.get(dest) + 1) > avg) underCapacityTServer.remove(index);
if (dest.equals(e.getKey())) continue; migrationsOut.add(new TabletMigration(ke, e.getKey(), dest)); if (numTablets.put(dest, numTablets.get(dest) + 1) > avg) underCapacityTServer.remove(index);
result.add(new TabletMigration(extent, tooMuch.server, tooLittle.server));
tooMuch.count--; tooLittle.count++; result.add(new TabletMigration(extent, tooMuch.server, tooLittle.server));
LOG.info("Tablet {} is currently outside the bounds of the" + " regex, migrating from {} to {}", ke, e.getKey(), nextTS); migrationsOut.add(new TabletMigration(ke, e.getKey(), nextTS)); if (migrationsOut.size() >= this.maxTServerMigrations) { break;
private void populateMigrations(Set<TServerInstance> current, List<TabletMigration> migrationsOut, Moves moves) { if (moves.size() == 0) { return; } Function<KeyExtent,String> partitioner = getPartitioner(); for (Pair<KeyExtent,Location> entry : getLocationProvider()) { String group = partitioner.apply(entry.getFirst()); Location loc = entry.getSecond(); if (loc.equals(Location.NONE) || !current.contains(loc.getTserverInstance())) { migrationsOut.clear(); return; } TServerInstance dest = moves.removeMove(loc.getTserverInstance(), group); if (dest != null) { migrationsOut.add(new TabletMigration(entry.getFirst(), loc.getTserverInstance(), dest)); if (moves.size() == 0) { break; } } } }