文档

GetCsccJobInstance

更新时间:
一键部署

获取实例的运行状态。

/**
* 获取实例的详情
* @param  instanceId,通过StartCsccJob的返回对象StartCsccJobResponse对象的data来获取instanceId
* @throws Exception
* @return GetCsccJobInstanceResponse
*/
public GetCsccJobInstanceResponse GetCsccJobInstance(Long instanceId) throws Exception {
    GetCsccJobInstanceRequest getCsccJobInstanceRequest = new GetCsccJobInstanceRequest();

    getCsccJobInstanceRequest.setJobInstanceId(instanceId);
    // 发起请求
    GetCsccJobInstanceResponse getCsccJobInstanceResponse = authClient.getCsccJobInstance(getCsccJobInstanceRequest);

    LOG.info("启动任务返回数据:getData:{}",GSON.toJson(getCsccJobInstanceResponse));
    //实例的状态可以参考com.alibaba.dt.wuliang.common.enums.JobInstanceState这个枚举
    return getCsccJobInstanceResponse;
}