Java Code Examples for org.apache.flink.mesos.scheduler.TaskMonitor#TaskGoalState

The following examples show how to use org.apache.flink.mesos.scheduler.TaskMonitor#TaskGoalState . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MesosResourceManager.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Extracts the Mesos task goal state from the worker information.
 *
 * @param worker the persistent worker information.
 * @return goal state information for the {@Link TaskMonitor}.
 */
static TaskMonitor.TaskGoalState extractGoalState(MesosWorkerStore.Worker worker) {
	switch(worker.state()) {
		case New: return new TaskMonitor.New(worker.taskID());
		case Launched: return new TaskMonitor.Launched(worker.taskID(), worker.slaveID().get());
		case Released: return new TaskMonitor.Released(worker.taskID(), worker.slaveID().get());
		default: throw new IllegalArgumentException("unsupported worker state");
	}
}
 
Example 2
Source File: MesosResourceManager.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Extracts the Mesos task goal state from the worker information.
 *
 * @param worker the persistent worker information.
 * @return goal state information for the {@Link TaskMonitor}.
 */
static TaskMonitor.TaskGoalState extractGoalState(MesosWorkerStore.Worker worker) {
	switch(worker.state()) {
		case New: return new TaskMonitor.New(worker.taskID());
		case Launched: return new TaskMonitor.Launched(worker.taskID(), worker.slaveID().get());
		case Released: return new TaskMonitor.Released(worker.taskID(), worker.slaveID().get());
		default: throw new IllegalArgumentException("unsupported worker state");
	}
}
 
Example 3
Source File: MesosResourceManager.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Extracts the Mesos task goal state from the worker information.
 *
 * @param worker the persistent worker information.
 * @return goal state information for the {@Link TaskMonitor}.
 */
static TaskMonitor.TaskGoalState extractGoalState(MesosWorkerStore.Worker worker) {
	switch(worker.state()) {
		case New: return new TaskMonitor.New(worker.taskID());
		case Launched: return new TaskMonitor.Launched(worker.taskID(), worker.slaveID().get());
		case Released: return new TaskMonitor.Released(worker.taskID(), worker.slaveID().get());
		default: throw new IllegalArgumentException("unsupported worker state");
	}
}