public VertexTask(int id, string node, YarnTaskState state, int requeueCount, DateTime changeTime) { Id = id; Node = node; State = state; RequeueCount = requeueCount; ChangeTime = changeTime; }
public void QueueYarnUpdate(int taskId, int taskState, string nodeName) { DryadLogger.LogInformation("QueueYarnUpdate", "Task {0} on node {2} is in state {3}", taskId, nodeName, taskState); // Set change event arguments YarnTaskState yTaskState = (YarnTaskState)taskState; VertexTask v = new VertexTask(taskId, nodeName, yTaskState, int.MaxValue, DateTime.UtcNow); m_taskUpdateQueue.Add(v); }
private VertexTaskState YarnTaskStateToVertexTaskState(YarnTaskState ts) { VertexTaskState vts = VertexTaskState.NA; if (ts == YarnTaskState.NA) { vts = VertexTaskState.NA; } else if (ts < YarnTaskState.Running) { vts = VertexTaskState.Waiting; } else if (ts == YarnTaskState.Running) { vts = VertexTaskState.Running; } else { switch (ts) { case YarnTaskState.Completed: vts = VertexTaskState.Finished; break; case YarnTaskState.Failed: vts = VertexTaskState.Failed; break; //case TaskState.Canceled: //case TaskState.Canceling: // vts = VertexTaskState.Canceled; // break; } } DryadLogger.LogDebug("Task State", "Mapped ts: {0} to vts: {1}", ts, vts); return(vts); }
public VertexTask(int id, string node, YarnTaskState state, int requeueCount, DateTime changeTime) { Id = id; Node = node; State = state; RequeueCount = requeueCount; ChangeTime = changeTime; }
private VertexTaskState YarnTaskStateToVertexTaskState(YarnTaskState ts) { VertexTaskState vts = VertexTaskState.NA; if (ts == YarnTaskState.NA) { vts = VertexTaskState.NA; } else if (ts < YarnTaskState.Running) { vts = VertexTaskState.Waiting; } else if (ts == YarnTaskState.Running) { vts = VertexTaskState.Running; } else { switch (ts) { case YarnTaskState.Completed: vts = VertexTaskState.Finished; break; case YarnTaskState.Failed: vts = VertexTaskState.Failed; break; //case TaskState.Canceled: //case TaskState.Canceling: // vts = VertexTaskState.Canceled; // break; } } DryadLogger.LogDebug("Task State", "Mapped ts: {0} to vts: {1}", ts, vts); return vts; }