Permalink
Browse files

Simplify client and master logging a bit

  • Loading branch information...
1 parent 8d4eda8 commit b87e687135023640634e65fe78942148e2d161b6 @jwills jwills committed Jul 16, 2012
@@ -77,10 +77,9 @@ public int handle(YarnClientService service) throws Exception {
String trackingUrl = null;
while (service.isRunning()) {
- Thread.sleep(1000);
-
- ApplicationReport report = service.getApplicationReport();
if (trackingUrl == null) {
+ Thread.sleep(1000);
+ ApplicationReport report = service.getApplicationReport();
YarnApplicationState yarnAppState = report.getYarnApplicationState();
if (yarnAppState == YarnApplicationState.RUNNING) {
trackingUrl = report.getTrackingUrl();
@@ -92,9 +91,6 @@ public int handle(YarnClientService service) throws Exception {
}
}
}
- if (report.getFinalApplicationStatus() != FinalApplicationStatus.UNDEFINED) {
- break;
- }
}
LOG.info("Checking final app report");
@@ -224,7 +224,7 @@ public boolean doWork() {
handleAllocation(resp);
completed = checkContainerStatuses(resp);
}
- LOG.info(String.format("Completed = %d, Needed = %d", completed, needed));
+ LOG.info(String.format("Total completed Containers = %d", completed));
return shouldWork();
}

0 comments on commit b87e687

Please sign in to comment.