YARN-4153. TestAsyncDispatcher failed at branch-2.7. Contributed by Zhihai Xu
This commit is contained in:
parent
7d3e882a49
commit
30569d930f
|
@ -83,6 +83,7 @@ public class JvmPauseMonitor {
|
|||
|
||||
public void stop() {
|
||||
shouldRun = false;
|
||||
if (monitorThread != null) {
|
||||
monitorThread.interrupt();
|
||||
try {
|
||||
monitorThread.join();
|
||||
|
@ -90,6 +91,7 @@ public class JvmPauseMonitor {
|
|||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isStarted() {
|
||||
return monitorThread != null;
|
||||
|
|
|
@ -71,6 +71,8 @@ Release 2.7.2 - UNRELEASED
|
|||
YARN-4096. App local logs are leaked if log aggregation fails to initialize
|
||||
for the app. (Jason Lowe via zxu)
|
||||
|
||||
YARN-4153. TestAsyncDispatcher failed at branch-2.7 (Zhihai Xu via jianhe)
|
||||
|
||||
Release 2.7.1 - 2015-07-06
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -144,9 +144,12 @@ public class AsyncDispatcher extends AbstractService implements Dispatcher {
|
|||
YarnConfiguration.DEFAULT_DISPATCHER_DRAIN_EVENTS_TIMEOUT);
|
||||
|
||||
synchronized (waitForDrained) {
|
||||
while (!drained && eventHandlingThread.isAlive()) {
|
||||
while (!drained && eventHandlingThread != null
|
||||
&& eventHandlingThread.isAlive()
|
||||
&& System.currentTimeMillis() < endTime) {
|
||||
waitForDrained.wait(1000);
|
||||
LOG.info("Waiting for AsyncDispatcher to drain.");
|
||||
LOG.info("Waiting for AsyncDispatcher to drain. Thread state is :" +
|
||||
eventHandlingThread.getState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue