Ejemplo n.º 1
0
        /// <summary>
        /// Create a DryadLinqJobSchedule object starting from the job information.
        /// </summary>
        /// <param name="jobInfo">Job whose schedule is computed.</param>
        /// <param name="hideCancelledVertices">If true do not show the cancelled vertices.</param>
        public DryadLinqJobSchedule(DryadLinqJobInfo jobInfo, bool hideCancelledVertices)
        {
            this.utilization = new MachineUtilization();

            this.startTime = jobInfo.StartJMTime;
            this.X         = jobInfo.RunningTime.TotalSeconds;

            this.vertices = new List <ExecutedVertexInstance>();
            foreach (var stage in jobInfo.AllStages().ToList())
            {
                foreach (var vertex in stage.Vertices)
                {
                    if (hideCancelledVertices && vertex.State == ExecutedVertexInstance.VertexState.Cancelled)
                    {
                        continue;
                    }
                    string m = vertex.Machine;
                    this.utilization.Add(m, vertex);
                    this.vertices.Add(vertex);
                }
            }

            this.utilization.Sort();
            this.Y = spacing * this.utilization.MachineCount;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a DryadLinqJobSchedule object starting from the job information.
        /// </summary>
        /// <param name="jobInfo">Job whose schedule is computed.</param>
        /// <param name="hideCancelledVertices">If true do not show the cancelled vertices.</param>
        public DryadLinqJobSchedule(DryadLinqJobInfo jobInfo, bool hideCancelledVertices)
        {
            this.utilization = new MachineUtilization();

            this.startTime = jobInfo.StartJMTime;
            this.X = jobInfo.RunningTime.TotalSeconds;
            
            this.vertices = new List<ExecutedVertexInstance>();
            foreach (var stage in jobInfo.AllStages().ToList())
            {
                foreach (var vertex in stage.Vertices)
                {
                    if (hideCancelledVertices && vertex.State == ExecutedVertexInstance.VertexState.Cancelled)
                        continue;
                    string m = vertex.Machine;
                    this.utilization.Add(m, vertex);
                    this.vertices.Add(vertex);
                }
            }

            this.utilization.Sort();
            this.Y = spacing * this.utilization.MachineCount;
        }