全部产品
Search
文档中心

:重启作业

更新时间:Apr 12, 2018

方法说明

通过指定的作业ID来重新启动作业(startJob)。

当作业的状态为Stopped或者Failed,才可以调用该接口。

  • 当 Failed 状态的作业重启之后,已经运行成功的 Instance 不会重新运行。

参数说明

参数 类型 说明
jobId String 作业ID

返回值说明

  • 启动成功后返回一个StartJobResponse实例。

  • 启动失败后,抛出异常: ClientException。

代码示例

  1. try{
  2. StartJobResponse response = client.startJob("job-0101010299123");
  3. //重启作业成功
  4. }catch(ClientException e){
  5. e.printStackTrace();
  6. //重启作业失败
  7. }