svn merge -c 1510581 Merging from trunk to branch-2 to fix MAPREDUCE-5446. TestJobHistoryEvents and TestJobHistoryParsing have race conditions.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1510583 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
299b910a01
commit
7d36680e73
|
@ -49,6 +49,9 @@ Release 2.1.1-beta - UNRELEASED
|
||||||
MAPREDUCE-5352. Optimize node local splits generated by
|
MAPREDUCE-5352. Optimize node local splits generated by
|
||||||
CombineFileInputFormat. (sseth)
|
CombineFileInputFormat. (sseth)
|
||||||
|
|
||||||
|
MAPREDUCE-5446. TestJobHistoryEvents and TestJobHistoryParsing have race
|
||||||
|
conditions (jlowe via kihwal)
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
||||||
MAPREDUCE-5385. Fixed a bug with JobContext getCacheFiles API. (Omkar Vinit
|
MAPREDUCE-5385. Fixed a bug with JobContext getCacheFiles API. (Omkar Vinit
|
||||||
|
|
|
@ -357,15 +357,20 @@ public class MRApp extends MRAppMaster {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void waitForState(Service.STATE finalState) throws Exception {
|
public void waitForState(Service.STATE finalState) throws Exception {
|
||||||
int timeoutSecs = 0;
|
if (finalState == Service.STATE.STOPPED) {
|
||||||
while (!finalState.equals(getServiceState()) && timeoutSecs++ < 20) {
|
Assert.assertTrue("Timeout while waiting for MRApp to stop",
|
||||||
System.out.println("MRApp State is : " + getServiceState()
|
waitForServiceToStop(20 * 1000));
|
||||||
+ " Waiting for state : " + finalState);
|
} else {
|
||||||
Thread.sleep(500);
|
int timeoutSecs = 0;
|
||||||
|
while (!finalState.equals(getServiceState()) && timeoutSecs++ < 20) {
|
||||||
|
System.out.println("MRApp State is : " + getServiceState()
|
||||||
|
+ " Waiting for state : " + finalState);
|
||||||
|
Thread.sleep(500);
|
||||||
|
}
|
||||||
|
System.out.println("MRApp State is : " + getServiceState());
|
||||||
|
Assert.assertEquals("MRApp state is not correct (timedout)", finalState,
|
||||||
|
getServiceState());
|
||||||
}
|
}
|
||||||
System.out.println("MRApp State is : " + getServiceState());
|
|
||||||
Assert.assertEquals("MRApp state is not correct (timedout)", finalState,
|
|
||||||
getServiceState());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void verifyCompleted() {
|
public void verifyCompleted() {
|
||||||
|
|
Loading…
Reference in New Issue