public MockAppContext(int appid, int numJobs, int numTasks, int numAttempts, bool hasFailedTasks) { appID = MockJobs.NewAppID(appid); appAttemptID = ApplicationAttemptId.NewInstance(appID, 0); jobs = MockJobs.NewJobs(appID, numJobs, numTasks, numAttempts, hasFailedTasks); }
public MockAppContext(int appid, int numTasks, int numAttempts, Path confPath) { appID = MockJobs.NewAppID(appid); appAttemptID = ApplicationAttemptId.NewInstance(appID, 0); IDictionary <JobId, Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job> map = Maps.NewHashMap (); Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = MockJobs.NewJob(appID, 0, numTasks , numAttempts, confPath); map[job.GetID()] = job; jobs = map; }
/// <summary>Create numJobs in a map with jobs having appId==jobId</summary> public static IDictionary <JobId, Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job> NewJobs (int numJobs, int numTasksPerJob, int numAttemptsPerTask) { IDictionary <JobId, Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job> map = Maps.NewHashMap (); for (int j = 0; j < numJobs; ++j) { ApplicationId appID = MockJobs.NewAppID(j); Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = NewJob(appID, j, numTasksPerJob, numAttemptsPerTask); map[job.GetID()] = job; } return(map); }
public MockAppContext(int appid) { appID = MockJobs.NewAppID(appid); appAttemptID = ApplicationAttemptId.NewInstance(appID, 0); jobs = null; }