/**
* 查找执行器信息.
*
* @param appName 作业云配置App的名字
* @return 执行器信息
* @throws JSONException 解析JSON格式异常
*/
public Collection<ExecutorStateInfo> executors(final String appName) throws JSONException {
return Collections2.transform(findExecutors(fetch(stateUrl).getJSONArray("frameworks"), appName), new Function<JSONObject, ExecutorStateInfo>() {
@Override
public ExecutorStateInfo apply(final JSONObject input) {
try {
return ExecutorStateInfo.builder().id(getExecutorId(input)).slaveId(input.getString("slave_id")).build();
} catch (final JSONException ex) {
throw new RuntimeException(ex);
}
}
});
}
MesosStateService.java 文件源码
java
阅读 15
收藏 0
点赞 0
评论 0
项目:elastic-job-cloud
作者:
评论列表
文章目录