Revert "HBASE-19527 Make ExecutorService threads daemon=true"
Applied prematurely. Revert.
This reverts commit 5e4ed33fa2
.
This commit is contained in:
parent
0f5b0fb759
commit
af2d890055
|
@ -1710,7 +1710,6 @@ public class ProcedureExecutor<TEnvironment> {
|
|||
|
||||
public WorkerThread(final ThreadGroup group) {
|
||||
super(group, "ProcExecWrkr-" + workerId.incrementAndGet());
|
||||
setDaemon(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1785,7 +1784,6 @@ public class ProcedureExecutor<TEnvironment> {
|
|||
|
||||
public TimeoutExecutorThread(final ThreadGroup group) {
|
||||
super(group, "ProcExecTimeout");
|
||||
setDaemon(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -178,7 +178,7 @@ public class ExecutorService {
|
|||
// name the threads for this threadpool
|
||||
ThreadFactoryBuilder tfb = new ThreadFactoryBuilder();
|
||||
tfb.setNameFormat(this.name + "-%d");
|
||||
tfb.setDaemon(true);
|
||||
// TODO: Should these executors be daemon threads?
|
||||
this.threadPoolExecutor.setThreadFactory(tfb.build());
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.apache.hadoop.hbase.client.Table;
|
|||
import org.apache.hadoop.hbase.master.HMaster;
|
||||
import org.apache.hadoop.hbase.master.LoadBalancer;
|
||||
import org.apache.hadoop.hbase.regionserver.HRegion;
|
||||
import org.apache.hadoop.hbase.regionserver.Region;
|
||||
import org.apache.hadoop.hbase.testclassification.MediumTests;
|
||||
import org.apache.hadoop.hbase.util.JVMClusterUtil;
|
||||
import org.apache.hadoop.hbase.util.Threads;
|
||||
|
@ -195,6 +196,15 @@ public class TestRegionsOnMasterOptions {
|
|||
// still only carry system regions post crash.
|
||||
assertEquals(masterCount, mNewActualCount);
|
||||
}
|
||||
// Disable balancer and wait till RIT done else cluster won't go down.
|
||||
TEST_UTIL.getAdmin().balancerSwitch(false, true);
|
||||
while (true) {
|
||||
if (!TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
|
||||
isMetaRegionInTransition()) {
|
||||
break;
|
||||
}
|
||||
Threads.sleep(10);
|
||||
}
|
||||
} finally {
|
||||
LOG.info("Running shutdown of cluster");
|
||||
TEST_UTIL.shutdownMiniCluster();
|
||||
|
|
Loading…
Reference in New Issue