@Override
  public void perform() throws Exception {
    getLogger().info("Performing action: Rolling restarting non-master region servers");
    List<ServerName> selectedServers = selectServers();
    getLogger().info("Disabling balancer to make unloading possible");
    setBalancer(false, true);
    Random rand = ThreadLocalRandom.current();
    for (ServerName server : selectedServers) {
      String rsName = server.getAddress().toString();
      try (
        RegionMover rm = new RegionMover.RegionMoverBuilder(rsName, getConf()).ack(true).build()) {
        getLogger().info("Unloading {}", server);
        rm.unload();
        getLogger().info("Restarting {}", server);
        gracefulRestartRs(server, sleepTime);
        getLogger().info("Loading {}", server);
        rm.load();
      } catch (Shell.ExitCodeException e) {
        getLogger().info("Problem restarting but presume successful; code={}", e.getExitCode(), e);
      } catch (Exception e) {
        getLogger().info("Exception but continuing...", e);
      }
      sleep(rand.nextInt((int) sleepTime));
    }
    getLogger().info("Enabling balancer");
    setBalancer(true, true);
  }
Gracefully restarts every regionserver in a rolling fashion. At each step, it unloads, restarts
the loads every rs server sleeping randomly (0-sleepTime) in between servers.
hbase-it/src/test/java/org/apache/hadoop/hbase/chaos/actions/GracefulRollingRestartRsAction.java