/// <param name="queueName"/> /// <param name="schedulingInfo"/> /// <param name="state"/> /// <param name="stats"/> public QueueInfo(string queueName, string schedulingInfo, QueueState state, JobStatus [] stats) : this(queueName, schedulingInfo) { this.queueState = state; this.stats = stats; }
public virtual void TestEnums() { foreach (YarnApplicationState applicationState in YarnApplicationState.Values()) { TypeConverter.FromYarn(applicationState, FinalApplicationStatus.Failed); } // ad hoc test of NEW_SAVING, which is newly added NUnit.Framework.Assert.AreEqual(JobStatus.State.Prep, TypeConverter.FromYarn(YarnApplicationState .NewSaving, FinalApplicationStatus.Failed)); foreach (TaskType taskType in TaskType.Values()) { TypeConverter.FromYarn(taskType); } foreach (JobState jobState in JobState.Values()) { TypeConverter.FromYarn(jobState); } foreach (QueueState queueState in QueueState.Values()) { TypeConverter.FromYarn(queueState); } foreach (TaskState taskState in TaskState.Values()) { TypeConverter.FromYarn(taskState); } }
public static QueueState FromYarn(QueueState state) { QueueState qState = QueueState.GetState(StringUtils.ToLowerCase(state.ToString()) ); return(qState); }
/// <summary>Default constructor for QueueInfo.</summary> public QueueInfo() { //The scheduling Information object is read back as String. //Once the scheduling information is set there is no way to recover it. // Jobs submitted to the queue // make it running by default. this.queueState = QueueState.Running; children = new AList <Org.Apache.Hadoop.Mapreduce.QueueInfo>(); props = new Properties(); }
/// <exception cref="System.IO.IOException"/> public virtual void ReadFields(DataInput @in) { queueName = StringInterner.WeakIntern(Text.ReadString(@in)); queueState = WritableUtils.ReadEnum <QueueState>(@in); schedulingInfo = StringInterner.WeakIntern(Text.ReadString(@in)); int length = @in.ReadInt(); stats = new JobStatus[length]; for (int i = 0; i < length; i++) { stats[i] = new JobStatus(); stats[i].ReadFields(@in); } int count = @in.ReadInt(); children.Clear(); for (int i_1 = 0; i_1 < count; i_1++) { Org.Apache.Hadoop.Mapreduce.QueueInfo childQueueInfo = new Org.Apache.Hadoop.Mapreduce.QueueInfo (); childQueueInfo.ReadFields(@in); children.AddItem(childQueueInfo); } }
/// <summary>Set the state of the queue</summary> /// <param name="state">state of the queue.</param> protected internal virtual void SetState(QueueState state) { queueState = state; }