Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a bug in failure checking on appmaster shutdown

  • Loading branch information...
commit 1487057c6188016868ad23b51645432634b9cf70 1 parent 7d41602
@jwills jwills authored
View
2  java/master/src/main/java/com/cloudera/kitten/appmaster/ApplicationMaster.java
@@ -36,7 +36,7 @@ public int run(String[] args) throws Exception {
while (service.hasRunningContainers()) {
Thread.sleep(1000);
}
- service.stop();
+ service.stopAndWait();
return 0;
}
View
2  java/master/src/main/java/com/cloudera/kitten/appmaster/service/ApplicationMasterServiceImpl.java
@@ -168,7 +168,7 @@ protected void shutDown() {
FinishApplicationMasterRequest finishReq = Records.newRecord(
FinishApplicationMasterRequest.class);
finishReq.setAppAttemptId(getApplicationAttemptId());
- if (state() == State.FAILED || totalFailures.incrementAndGet() > parameters.getAllowedFailures()) {
+ if (state() == State.FAILED || totalFailures.get() > parameters.getAllowedFailures()) {
//TODO: diagnostics
finishReq.setFinishApplicationStatus(FinalApplicationStatus.FAILED);
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.