org.apache.flink.util.Visitor Java Examples

The following examples show how to use org.apache.flink.util.Visitor. 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 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: 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 #4
Source File: DualInputOperator.java    From flink 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 #5
Source File: DualInputPlanNode.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void accept(Visitor<PlanNode> visitor) {
	if (visitor.preVisit(this)) {
		this.input1.getSource().accept(visitor);
		this.input2.getSource().accept(visitor);
		
		for (Channel broadcastInput : getBroadcastInputs()) {
			broadcastInput.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example #6
Source File: SingleInputNode.java    From Flink-CEPplus 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: BulkIterationPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void acceptForStepFunction(Visitor<PlanNode> visitor) {
	this.rootOfStepFunction.accept(visitor);
	
	if(this.rootOfTerminationCriterion != null) {
		this.rootOfTerminationCriterion.accept(visitor);
	}
}
 
Example #8
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 #9
Source File: DataSinkNode.java    From Flink-CEPplus 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();
		}
		visitor.postVisit(this);
	}
}
 
Example #10
Source File: SingleInputOperator.java    From Flink-CEPplus 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 #11
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 #12
Source File: BulkIterationPlanNode.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void acceptForStepFunction(Visitor<PlanNode> visitor) {
	this.rootOfStepFunction.accept(visitor);
	
	if(this.rootOfTerminationCriterion != null) {
		this.rootOfTerminationCriterion.accept(visitor);
	}
}
 
Example #13
Source File: DualInputPlanNode.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.input1.getSource().accept(visitor);
		this.input2.getSource().accept(visitor);
		
		for (Channel broadcastInput : getBroadcastInputs()) {
			broadcastInput.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example #14
Source File: NAryUnionPlanNode.java    From Flink-CEPplus 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 #15
Source File: SingleInputPlanNode.java    From Flink-CEPplus 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 #16
Source File: Plan.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Traverses the job depth first from all data sinks on towards the sources.
 * 
 * @see Visitable#accept(Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	for (GenericDataSinkBase<?> sink : this.sinks) {
		sink.accept(visitor);
	}
}
 
Example #17
Source File: DualInputOperator.java    From flink 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 #18
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 #19
Source File: DataSinkNode.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();
		}
		visitor.postVisit(this);
	}
}
 
Example #20
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 #21
Source File: DualInputPlanNode.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.input1.getSource().accept(visitor);
		this.input2.getSource().accept(visitor);
		
		for (Channel broadcastInput : getBroadcastInputs()) {
			broadcastInput.getSource().accept(visitor);
		}
		
		visitor.postVisit(this);
	}
}
 
Example #22
Source File: BulkIterationPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void acceptForStepFunction(Visitor<PlanNode> visitor) {
	this.rootOfStepFunction.accept(visitor);
	
	if(this.rootOfTerminationCriterion != null) {
		this.rootOfTerminationCriterion.accept(visitor);
	}
}
 
Example #23
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 #24
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 #25
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 #26
Source File: Plan.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * Traverses the job depth first from all data sinks on towards the sources.
 *
 * @see Visitable#accept(Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	for (GenericDataSinkBase<?> sink : this.sinks) {
		sink.accept(visitor);
	}
}
 
Example #27
Source File: DataSinkNode.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();
		}
		visitor.postVisit(this);
	}
}
 
Example #28
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 #29
Source File: Plan.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * Traverses the job depth first from all data sinks on towards the sources.
 * 
 * @see Visitable#accept(Visitor)
 */
@Override
public void accept(Visitor<Operator<?>> visitor) {
	for (GenericDataSinkBase<?> sink : this.sinks) {
		sink.accept(visitor);
	}
}
 
Example #30
Source File: BulkPartialSolutionPlanNode.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);
	}
}