0

我正在尝试禁用作为 Azkaban 流程一部分的作业,该流程本身是另一个流程的子流程,即。参考在执行流程Parentflow > Childflow >> Job_To_Disable时可以根据 Azkaban 文档传递的禁用参数,我可以完全禁用子流程,但不能完全禁用子作业。我使用的示例代码如下:

  az_obj.initializeSession();
  HashMap<String, String> map = new HashMap<>();
  map.put("Sname","Student_name");
  map.put("Srno","12345");
  HashMap<String, String> Disabledflows = new HashMap<>();
  Disabledflows.put("children","[\"Job_To_Disable\"]");
  Disabledflows.put("id","Childflow");
  JSONObject disabledJSON = new JSONObject(Disabledflows);
  String disabledString = disabledJSON.toString();
  HashMap<String, String> flow_options = new HashMap<>();
  flow_options.put("disabled", "["+ disabledString + "]");
  JSONObject ex_data = az_obj.executeWithOptions("ProjectName", "ParentFlow",
      flow_options, map);

也试过做

  flow_options.put("disabled", "[{\"id\":\"Childflow\",\"children\":[\"Job_To_Disable\"]}]");

我正在尝试使用 Java 代码实现以下选项,但无法这样做。

disabled=[{"id":"ImportFlow","children":["Job_To_Disable"]}]
4

0 回答 0