Beispiel #1
0
 public MapTaskAttemptImpl(TaskId taskId, int attempt, EventHandler eventHandler,
                           Path jobFile, int partition, JobSplit.TaskSplitMetaInfo splitInfo, JobConf conf,
                           TaskAttemptListener taskAttemptListener, Org.Apache.Hadoop.Security.Token.Token <
                               JobTokenIdentifier> jobToken, Credentials credentials, Clock clock, AppContext appContext
                           )
     : base(taskId, attempt, eventHandler, taskAttemptListener, jobFile, partition, conf
            , splitInfo.GetLocations(), jobToken, credentials, clock, appContext)
 {
     this.splitInfo = splitInfo;
 }
Beispiel #2
0
 public virtual void Setup()
 {
     dispatcher = new InlineDispatcher();
     ++startCount;
     conf = new JobConf();
     taskAttemptListener = Org.Mockito.Mockito.Mock <TaskAttemptListener>();
     jobToken            = (Org.Apache.Hadoop.Security.Token.Token <JobTokenIdentifier>)Org.Mockito.Mockito.Mock
                           <Org.Apache.Hadoop.Security.Token.Token>();
     remoteJobConfFile = Org.Mockito.Mockito.Mock <Path>();
     credentials       = null;
     clock             = new SystemClock();
     metrics           = Org.Mockito.Mockito.Mock <MRAppMetrics>();
     dataLocations     = new string[1];
     appId             = ApplicationId.NewInstance(Runtime.CurrentTimeMillis(), 1);
     jobId             = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <JobId>();
     jobId.SetId(1);
     jobId.SetAppId(appId);
     appContext        = Org.Mockito.Mockito.Mock <AppContext>();
     taskSplitMetaInfo = Org.Mockito.Mockito.Mock <JobSplit.TaskSplitMetaInfo>();
     Org.Mockito.Mockito.When(taskSplitMetaInfo.GetLocations()).ThenReturn(dataLocations
                                                                           );
     taskAttempts = new AList <TestTaskImpl.MockTaskAttemptImpl>();
 }