use of org.apache.flink.runtime.rest.messages.JobVertexTaskManagersInfo.TaskManagersInfo in project flink by splunk.
the class JobVertexTaskManagersInfoTest method getTestResponseInstance.
@Override
protected JobVertexTaskManagersInfo getTestResponseInstance() throws Exception {
final Random random = new Random();
List<TaskManagersInfo> taskManagersInfoList = new ArrayList<>();
final Map<ExecutionState, Integer> statusCounts = new HashMap<>(ExecutionState.values().length);
final IOMetricsInfo jobVertexMetrics = new IOMetricsInfo(random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean());
int count = 100;
for (ExecutionState executionState : ExecutionState.values()) {
statusCounts.put(executionState, count++);
}
taskManagersInfoList.add(new TaskManagersInfo("host1", ExecutionState.CANCELING, 1L, 2L, 3L, jobVertexMetrics, statusCounts, "taskmanagerId"));
return new JobVertexTaskManagersInfo(new JobVertexID(), "test", System.currentTimeMillis(), taskManagersInfoList);
}
use of org.apache.flink.runtime.rest.messages.JobVertexTaskManagersInfo.TaskManagersInfo in project flink by apache.
the class JobVertexTaskManagersInfoTest method getTestResponseInstance.
@Override
protected JobVertexTaskManagersInfo getTestResponseInstance() throws Exception {
final Random random = new Random();
List<TaskManagersInfo> taskManagersInfoList = new ArrayList<>();
final Map<ExecutionState, Integer> statusCounts = new HashMap<>(ExecutionState.values().length);
final IOMetricsInfo jobVertexMetrics = new IOMetricsInfo(random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean());
int count = 100;
for (ExecutionState executionState : ExecutionState.values()) {
statusCounts.put(executionState, count++);
}
taskManagersInfoList.add(new TaskManagersInfo("host1", ExecutionState.CANCELING, 1L, 2L, 3L, jobVertexMetrics, statusCounts, "taskmanagerId"));
return new JobVertexTaskManagersInfo(new JobVertexID(), "test", System.currentTimeMillis(), taskManagersInfoList);
}
use of org.apache.flink.runtime.rest.messages.JobVertexTaskManagersInfo.TaskManagersInfo in project flink-mirror by flink-ci.
the class JobVertexTaskManagersInfoTest method getTestResponseInstance.
@Override
protected JobVertexTaskManagersInfo getTestResponseInstance() throws Exception {
final Random random = new Random();
List<TaskManagersInfo> taskManagersInfoList = new ArrayList<>();
final Map<ExecutionState, Integer> statusCounts = new HashMap<>(ExecutionState.values().length);
final IOMetricsInfo jobVertexMetrics = new IOMetricsInfo(random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextBoolean());
int count = 100;
for (ExecutionState executionState : ExecutionState.values()) {
statusCounts.put(executionState, count++);
}
taskManagersInfoList.add(new TaskManagersInfo("host1", ExecutionState.CANCELING, 1L, 2L, 3L, jobVertexMetrics, statusCounts, "taskmanagerId"));
return new JobVertexTaskManagersInfo(new JobVertexID(), "test", System.currentTimeMillis(), taskManagersInfoList);
}
Aggregations