TaskLocationHint locationHint = new TaskLocationHint(
new HashSet<String>(Arrays.asList(new String[] {"127.0.0.1"})), null);
Resource resource = Resource.newInstance(1024, 1);
AppContext mockAppContext = mock(AppContext.class);
doReturn(new ClusterInfo()).when(mockAppContext).getClusterInfo();
TaskAttemptImpl taImpl = new MockTaskAttemptImpl(taskID, 1, eventHandler,
taListener, taskConf, new SystemClock(),
mock(TaskHeartbeatHandler.class), mockAppContext, locationHint, false,
resource, createFakeContainerContext(), false);