private static Thread getAndStartBalancerChore(final HMaster master) {
String name = master.getServerName() + "-BalancerChore";
int balancerPeriod =
master.getConfiguration().getInt("hbase.balancer.period", 300000);
// Start up the load balancer chore
Chore chore = new Chore(name, balancerPeriod, master) {
@Override
protected void chore() {
master.balance();
}
};
return Threads.setDaemonThreadRunning(chore.getThread());
}