Java Code Examples for org.apache.flink.util.Visitor#postVisit()

The following examples show how to use org.apache.flink.util.Visitor#postVisit() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TwoInputNode.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		if (this.input1 == null || this.input2 == null) {
			throw new CompilerException();
		}
		
		getFirstPredecessorNode().accept(visitor);
		getSecondPredecessorNode().accept(visitor);
		
		for (DagConnection connection : getBroadcastConnections()) {
			connection.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example 2
Source File: TwoInputNode.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		if (this.input1 == null || this.input2 == null) {
			throw new CompilerException();
		}
		
		getFirstPredecessorNode().accept(visitor);
		getSecondPredecessorNode().accept(visitor);
		
		for (DagConnection connection : getBroadcastConnections()) {
			connection.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example 3
Source File: NAryUnionPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	visitor.preVisit(this);
	for (Channel c : this.inputs) {
		c.getSource().accept(visitor);
	}
	visitor.postVisit(this);
}
 
Example 4
Source File: SingleInputOperator.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Accepts the visitor and applies it this instance. The visitors pre-visit method is called and, if returning 
 * <tt>true</tt>, the visitor is recursively applied on the single input. After the recursion returned,
 * the post-visit method is called.
 * 
 * @param visitor The visitor.
 *  
 * @see org.apache.flink.util.Visitable#accept(org.apache.flink.util.Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	if (visitor.preVisit(this)) {
		this.input.accept(visitor);
		for (Operator<?> c : this.broadcastInputs.values()) {
			c.accept(visitor);
		}
		visitor.postVisit(this);
	}
}
 
Example 5
Source File: DualInputOperator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<Operator<?>> visitor) {
	boolean descend = visitor.preVisit(this);
	if (descend) {
		this.input1.accept(visitor);
		this.input2.accept(visitor);
		for (Operator<?> c : this.broadcastInputs.values()) {
			c.accept(visitor);
		}
		visitor.postVisit(this);
	}
}
 
Example 6
Source File: SingleInputNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		if (getPredecessorNode() != null) {
			getPredecessorNode().accept(visitor);
		} else {
			throw new CompilerException();
		}
		for (DagConnection connection : getBroadcastConnections()) {
			connection.getSource().accept(visitor);
		}
		visitor.postVisit(this);
	}
}
 
Example 7
Source File: SingleInputOperator.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Accepts the visitor and applies it this instance. The visitors pre-visit method is called and, if returning 
 * <tt>true</tt>, the visitor is recursively applied on the single input. After the recursion returned,
 * the post-visit method is called.
 * 
 * @param visitor The visitor.
 *  
 * @see org.apache.flink.util.Visitable#accept(org.apache.flink.util.Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	if (visitor.preVisit(this)) {
		this.input.accept(visitor);
		for (Operator<?> c : this.broadcastInputs.values()) {
			c.accept(visitor);
		}
		visitor.postVisit(this);
	}
}
 
Example 8
Source File: SingleInputPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		this.input.getSource().accept(visitor);
		
		for (Channel broadcastInput : getBroadcastInputs()) {
			broadcastInput.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example 9
Source File: SingleInputPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		this.input.getSource().accept(visitor);
		
		for (Channel broadcastInput : getBroadcastInputs()) {
			broadcastInput.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example 10
Source File: SingleInputNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		if (getPredecessorNode() != null) {
			getPredecessorNode().accept(visitor);
		} else {
			throw new CompilerException();
		}
		for (DagConnection connection : getBroadcastConnections()) {
			connection.getSource().accept(visitor);
		}
		visitor.postVisit(this);
	}
}
 
Example 11
Source File: DeltaIterationBase.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<Operator<?>> visitor) {
	visitor.preVisit(this);
	visitor.postVisit(this);
}
 
Example 12
Source File: DeltaIterationBase.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<Operator<?>> visitor) {
	visitor.preVisit(this);
	visitor.postVisit(this);
}
 
Example 13
Source File: AbstractPartialSolutionNode.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 14
Source File: BulkPartialSolutionPlanNode.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 15
Source File: DataSourceNode.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 16
Source File: DataSourceNode.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<OptimizerNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 17
Source File: SolutionSetPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 18
Source File: BulkIterationBase.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<Operator<?>> visitor) {
	visitor.preVisit(this);
	visitor.postVisit(this);
}
 
Example 19
Source File: WorksetPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}
 
Example 20
Source File: GenericDataSourceBase.java    From Flink-CEPplus with Apache License 2.0 3 votes vote down vote up
/**
 * Accepts the visitor and applies it this instance. Since the data sources have no inputs, no recursive descend
 * happens. The visitors pre-visit method is called and, if returning <tt>true</tt>, the post-visit method is called.
 * 
 * @param visitor The visitor.
 *  
 * @see org.apache.flink.util.Visitable#accept(org.apache.flink.util.Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	if (visitor.preVisit(this)) {
		visitor.postVisit(this);
	}
}