/** * Creates a {@link String} representation (not strictly ordered) of this instance. * * @return the {@link String} representation */ public String toExtensiveString() { return this.toExtensiveString(false); }
private void logStages(ExecutionPlan executionPlan) { if (this.logger.isInfoEnabled()) { StringBuilder sb = new StringBuilder(); Set<ExecutionStage> seenStages = new HashSet<>(); Queue<ExecutionStage> stagedStages = new LinkedList<>(executionPlan.getStartingStages()); ExecutionStage nextStage; while ((nextStage = stagedStages.poll()) != null) { sb.append(nextStage).append(":\n"); nextStage.getPlanAsString(sb, "* "); nextStage.getSuccessors().stream() .filter(seenStages::add) .forEach(stagedStages::add); } this.logger.info("Current execution plan:\n{}", executionPlan.toExtensiveString()); } }