MAPREDUCE-5688. TestStagingCleanup fails intermittently with JDK7 (Mit Desai via jeagles)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1570631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce63b04977
commit
19f870858e
|
@ -150,6 +150,9 @@ Release 2.5.0 - UNRELEASED
|
||||||
MAPREDUCE-5671. NaN can be created by client and assign to Progress (Chen
|
MAPREDUCE-5671. NaN can be created by client and assign to Progress (Chen
|
||||||
He via jeagles)
|
He via jeagles)
|
||||||
|
|
||||||
|
MAPREDUCE-5688. TestStagingCleanup fails intermittently with JDK7 (Mit
|
||||||
|
Desai via jeagles)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -34,6 +34,7 @@ import junit.framework.TestCase;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
import org.apache.hadoop.fs.FileSystem;
|
||||||
import org.apache.hadoop.fs.Path;
|
import org.apache.hadoop.fs.Path;
|
||||||
|
import org.apache.hadoop.mapreduce.Counters;
|
||||||
import org.apache.hadoop.mapreduce.JobID;
|
import org.apache.hadoop.mapreduce.JobID;
|
||||||
import org.apache.hadoop.mapreduce.MRJobConfig;
|
import org.apache.hadoop.mapreduce.MRJobConfig;
|
||||||
import org.apache.hadoop.mapreduce.TypeConverter;
|
import org.apache.hadoop.mapreduce.TypeConverter;
|
||||||
|
@ -124,7 +125,7 @@ import org.junit.Test;
|
||||||
when(fs.exists(stagingDir)).thenReturn(true);
|
when(fs.exists(stagingDir)).thenReturn(true);
|
||||||
ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
|
ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
|
||||||
0);
|
0);
|
||||||
ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 0);
|
ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 1);
|
||||||
JobId jobid = recordFactory.newRecordInstance(JobId.class);
|
JobId jobid = recordFactory.newRecordInstance(JobId.class);
|
||||||
jobid.setAppId(appId);
|
jobid.setAppId(appId);
|
||||||
ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
|
ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
|
||||||
|
@ -149,7 +150,7 @@ import org.junit.Test;
|
||||||
when(fs.exists(stagingDir)).thenReturn(true);
|
when(fs.exists(stagingDir)).thenReturn(true);
|
||||||
ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
|
ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
|
||||||
0);
|
0);
|
||||||
ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 0);
|
ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 1);
|
||||||
ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
|
ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
|
||||||
Assert.assertTrue(MRJobConfig.DEFAULT_MR_AM_MAX_ATTEMPTS > 1);
|
Assert.assertTrue(MRJobConfig.DEFAULT_MR_AM_MAX_ATTEMPTS > 1);
|
||||||
MRAppMaster appMaster = new TestMRApp(attemptId, mockAlloc,
|
MRAppMaster appMaster = new TestMRApp(attemptId, mockAlloc,
|
||||||
|
@ -282,6 +283,7 @@ import org.junit.Test;
|
||||||
String diagnostic) {
|
String diagnostic) {
|
||||||
JobImpl jobImpl = mock(JobImpl.class);
|
JobImpl jobImpl = mock(JobImpl.class);
|
||||||
when(jobImpl.getInternalState()).thenReturn(this.jobStateInternal);
|
when(jobImpl.getInternalState()).thenReturn(this.jobStateInternal);
|
||||||
|
when(jobImpl.getAllCounters()).thenReturn(new Counters());
|
||||||
JobID jobID = JobID.forName("job_1234567890000_0001");
|
JobID jobID = JobID.forName("job_1234567890000_0001");
|
||||||
JobId jobId = TypeConverter.toYarn(jobID);
|
JobId jobId = TypeConverter.toYarn(jobID);
|
||||||
when(jobImpl.getID()).thenReturn(jobId);
|
when(jobImpl.getID()).thenReturn(jobId);
|
||||||
|
|
Loading…
Reference in New Issue