Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,13 @@ class PlanBuilder(private[api] val wayangContext: WayangContext, private var job
*/
def buildAndExecute(): Unit = {
val plan: WayangPlan = new WayangPlan(this.sinks.toArray: _*)
if (this.experiment == null) this.wayangContext.execute(jobName, plan, this.udfJars.toArray: _*)
else this.wayangContext.execute(jobName, plan, this.experiment, this.udfJars.toArray: _*)

if (this.experiment == null) {
this.wayangContext.execute(jobName, plan, this.udfJars.toArray: _*)
}
else {
this.wayangContext.execute(jobName, plan, this.experiment, this.udfJars.toArray: _*)
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
import org.apache.wayang.core.util.OneTimeExecutable;
import org.apache.wayang.core.util.ReflectionUtils;
import org.apache.wayang.core.util.WayangCollections;
import org.apache.wayang.core.util.ExplainUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

Expand Down Expand Up @@ -304,6 +305,16 @@ protected void doExecute() {
this.logger.warn("Failed to initialize monitor: {}", e);
}

if (this.configuration.getBooleanProperty("wayang.core.explain.enabled")) {
ExplainUtils.write(
ExplainUtils.parsePlan(this.wayangPlan, true),
this.configuration.getStringProperty("wayang.core.explain.logical.file")
);
ExplainUtils.write(
ExplainUtils.parsePlan(executionPlan, true),
this.configuration.getStringProperty("wayang.core.explain.execution.file")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the user did not specify the file path?

);
}

// Take care of the execution.
while (!this.execute(executionPlan, executionId)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ wayang.core.optimizer.enumeration.branchesfirst = false
wayang.core.log.enabled = true
# wayang.core.log.cardinalities = ~/.wayang/cardinalities.json
# wayang.core.log.executions = ~/.wayang/executions.json
wayang.core.explain.enabled = false

# Configure re-optimization.
wayang.core.optimizer.reoptimize = false
Expand Down
Loading