Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        /// <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);
        }
Exemplo n.º 4
0
 public MockAppContext(int appid)
 {
     appID        = MockJobs.NewAppID(appid);
     appAttemptID = ApplicationAttemptId.NewInstance(appID, 0);
     jobs         = null;
 }