use of com.microsoft.azure.hdinsight.sdk.rest.spark.executor.Executor in project azure-tools-for-java by Microsoft.
the class SparkRestUtil method getAllExecutorFromApp.
public static List<Executor> getAllExecutorFromApp(@NotNull ApplicationKey key) throws IOException, HDIException, ExecutionException {
final AttemptWithAppId attemptWithAppId = getLastAttemptFromLocalCache(key);
final HttpEntity entity = getSparkRestEntity(key.getClusterDetails(), String.format("/%s/%s/executors", attemptWithAppId.getAppId(), attemptWithAppId.getAttemptId()));
Optional<List<Executor>> executors = ObjectConvertUtils.convertEntityToList(entity, Executor.class);
return executors.orElse(RestUtil.getEmptyList(Executor.class));
}
Aggregations