use of org.apache.flink.runtime.rest.messages.taskmanager.TaskManagersHeaders in project flink by apache.
the class MetricsAvailabilityITCase method getTaskManagerIds.
private static Collection<ResourceID> getTaskManagerIds(final RestClient restClient) throws Exception {
final TaskManagersHeaders headers = TaskManagersHeaders.getInstance();
final TaskManagersInfo response = fetchMetric(() -> restClient.sendRequest(HOST, PORT, headers, EmptyMessageParameters.getInstance(), EmptyRequestBody.getInstance()), taskManagersInfo -> !taskManagersInfo.getTaskManagerInfos().isEmpty());
return response.getTaskManagerInfos().stream().map(TaskManagerInfo::getResourceId).collect(Collectors.toList());
}
Aggregations