Exemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        public virtual void TestAverageMergeTime()
        {
            string         historyFileName  = "job_1329348432655_0001-1329348443227-user-Sleep+job-1329348468601-10-1-SUCCEEDED-default.jhist";
            string         confFileName     = "job_1329348432655_0001_conf.xml";
            Configuration  conf             = new Configuration();
            JobACLsManager jobAclsMgr       = new JobACLsManager(conf);
            Path           fulleHistoryPath = new Path(typeof(TestJobHistoryEntities).GetClassLoader().
                                                       GetResource(historyFileName).GetFile());
            Path fullConfPath = new Path(typeof(TestJobHistoryEntities).GetClassLoader().GetResource
                                             (confFileName).GetFile());

            HistoryFileManager.HistoryFileInfo info = Org.Mockito.Mockito.Mock <HistoryFileManager.HistoryFileInfo
                                                                                >();
            Org.Mockito.Mockito.When(info.GetConfFile()).ThenReturn(fullConfPath);
            JobId        jobId        = MRBuilderUtils.NewJobId(1329348432655l, 1, 1);
            CompletedJob completedJob = new CompletedJob(conf, jobId, fulleHistoryPath, true,
                                                         "user", info, jobAclsMgr);
            JobInfo jobInfo = new JobInfo(completedJob);

            // There are 2 tasks with merge time of 45 and 55 respectively. So average
            // merge time should be 50.
            NUnit.Framework.Assert.AreEqual(50L, jobInfo.GetAvgMergeTime());
        }
Exemplo n.º 2
0
	private void detach_CompletedJobs(CompletedJob entity)
	{
		this.SendPropertyChanging();
		entity.Engineer = null;
	}
Exemplo n.º 3
0
	private void attach_CompletedJobs(CompletedJob entity)
	{
		this.SendPropertyChanging();
		entity.Job = this;
	}
Exemplo n.º 4
0
 partial void DeleteCompletedJob(CompletedJob instance);
Exemplo n.º 5
0
 partial void UpdateCompletedJob(CompletedJob instance);
Exemplo n.º 6
0
 partial void InsertCompletedJob(CompletedJob instance);
Exemplo n.º 7
0
 private void detach_CompletedJobs(CompletedJob entity)
 {
     this.SendPropertyChanging();
     entity.Engineer = null;
 }
Exemplo n.º 8
0
 private void attach_CompletedJobs(CompletedJob entity)
 {
     this.SendPropertyChanging();
     entity.Job = this;
 }
Exemplo n.º 9
0
 partial void DeleteCompletedJob(CompletedJob instance);
Exemplo n.º 10
0
 partial void UpdateCompletedJob(CompletedJob instance);
Exemplo n.º 11
0
 partial void InsertCompletedJob(CompletedJob instance);