コード例 #1
0
ファイル: FSQueue.cs プロジェクト: orf53975/hadoop.net
 public FSQueue(string name, FairScheduler scheduler, FSParentQueue parent)
 {
     this.name      = name;
     this.scheduler = scheduler;
     this.metrics   = ((FSQueueMetrics)FSQueueMetrics.ForQueue(GetName(), parent, true,
                                                               scheduler.GetConf()));
     metrics.SetMinShare(GetMinShare());
     metrics.SetMaxShare(GetMaxShare());
     this.parent = parent;
 }
コード例 #2
0
        public virtual void SetUp()
        {
            conf = new FairSchedulerConfiguration();
            FairScheduler           scheduler = Org.Mockito.Mockito.Mock <FairScheduler>();
            AllocationConfiguration allocConf = new AllocationConfiguration(conf);

            Org.Mockito.Mockito.When(scheduler.GetAllocationConfiguration()).ThenReturn(allocConf
                                                                                        );
            Org.Mockito.Mockito.When(scheduler.GetConf()).ThenReturn(conf);
            SystemClock clock = new SystemClock();

            Org.Mockito.Mockito.When(scheduler.GetClock()).ThenReturn(clock);
            notEmptyQueues = new HashSet <FSQueue>();
            queueManager   = new _QueueManager_47(this, scheduler);
            FSQueueMetrics.ForQueue("root", null, true, conf);
            queueManager.Initialize(conf);
        }