diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java index 99628ce6c..5b37f4a16 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java +++ b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java @@ -96,10 +96,12 @@ public String toExtensiveString(boolean isStriclyOrdering) { } /** - * TODO: ExecutionPlan.toJsonList add documentation - * labels:documentation,todo + * Converts this execution plan into a list of maps, where each map represents an {@link ExecutionStage}. + * The stages are included in an order that, where possible, respects their dependencies (i.e., is + * dependency-respecting/topological), but loop-head stages may be scheduled early to break cycles, + * which can cause them to appear before all of their predecessors. * - * @return + * @return a list of maps representing the execution stages */ public List toJsonList() { Counter stageActivationCounter = new Counter<>(); diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java index ced34337d..bde78881b 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java +++ b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java @@ -313,6 +313,11 @@ private void toExtensiveStringAux(ExecutionTask task, Set seenTas } } + /** + * Converts this instance into a map that can be serialized to JSON. + * + * @return a map representing this instance + */ public Map toJsonMap() { HashMap jsonMap = new HashMap<>(); ArrayList operators = new ArrayList<>();