internal MyJobImpl(TestRuntimeEstimators _enclosing, JobId jobID, int numMaps, int numReduces) { this._enclosing = _enclosing; this.jobID = jobID; for (int i = 0; i < numMaps; ++i) { Task newTask = new TestRuntimeEstimators.MyTaskImpl(this, jobID, i, TaskType.Map); this.mapTasks[newTask.GetID()] = newTask; this.allTasks[newTask.GetID()] = newTask; } for (int i_1 = 0; i_1 < numReduces; ++i_1) { Task newTask = new TestRuntimeEstimators.MyTaskImpl(this, jobID, i_1, TaskType.Reduce ); this.reduceTasks[newTask.GetID()] = newTask; this.allTasks[newTask.GetID()] = newTask; } // give every task an attempt foreach (Task task in this.allTasks.Values) { TestRuntimeEstimators.MyTaskImpl myTaskImpl = (TestRuntimeEstimators.MyTaskImpl)task; myTaskImpl.AddAttempt(); } }
internal virtual void AddAttempt(Task task) { TestRuntimeEstimators.MyTaskImpl myTask = (TestRuntimeEstimators.MyTaskImpl)task; myTask.AddAttempt(); }