org.apache.flink.optimizer.dag.BinaryUnionNode Java Examples

The following examples show how to use org.apache.flink.optimizer.dag.BinaryUnionNode. 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: UnionParallelismAndForwardEnforcer.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
public boolean preVisit(OptimizerNode node) {

	// if the current node is a union
	if (node instanceof BinaryUnionNode) {
		int parallelism = -1;
		// set ship strategy of all outgoing connections to FORWARD.
		for (DagConnection conn : node.getOutgoingConnections()) {
			parallelism = conn.getTarget().getParallelism();
			conn.setShipStrategy(ShipStrategyType.FORWARD);
		}
		// adjust parallelism to be same as successor
		node.setParallelism(parallelism);
	}

	// traverse the whole plan
	return true;
}
 
Example #2
Source File: UnionParallelismAndForwardEnforcer.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
public boolean preVisit(OptimizerNode node) {

	// if the current node is a union
	if (node instanceof BinaryUnionNode) {
		int parallelism = -1;
		// set ship strategy of all outgoing connections to FORWARD.
		for (DagConnection conn : node.getOutgoingConnections()) {
			parallelism = conn.getTarget().getParallelism();
			conn.setShipStrategy(ShipStrategyType.FORWARD);
		}
		// adjust parallelism to be same as successor
		node.setParallelism(parallelism);
	}

	// traverse the whole plan
	return true;
}
 
Example #3
Source File: UnionParallelismAndForwardEnforcer.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
public boolean preVisit(OptimizerNode node) {

	// if the current node is a union
	if (node instanceof BinaryUnionNode) {
		int parallelism = -1;
		// set ship strategy of all outgoing connections to FORWARD.
		for (DagConnection conn : node.getOutgoingConnections()) {
			parallelism = conn.getTarget().getParallelism();
			conn.setShipStrategy(ShipStrategyType.FORWARD);
		}
		// adjust parallelism to be same as successor
		node.setParallelism(parallelism);
	}

	// traverse the whole plan
	return true;
}
 
Example #4
Source File: NAryUnionPlanNode.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * @param template
 */
public NAryUnionPlanNode(BinaryUnionNode template, List<Channel> inputs, GlobalProperties gProps,
		Costs cumulativeCosts)
{
	super(template, "Union", DriverStrategy.NONE);
	
	this.inputs = inputs;
	this.globalProps = gProps;
	this.localProps = new LocalProperties();
	this.nodeCosts = new Costs();
	this.cumulativeCosts = cumulativeCosts;
}
 
Example #5
Source File: NAryUnionPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * @param template
 */
public NAryUnionPlanNode(BinaryUnionNode template, List<Channel> inputs, GlobalProperties gProps,
		Costs cumulativeCosts)
{
	super(template, "Union", DriverStrategy.NONE);
	
	this.inputs = inputs;
	this.globalProps = gProps;
	this.localProps = new LocalProperties();
	this.nodeCosts = new Costs();
	this.cumulativeCosts = cumulativeCosts;
}
 
Example #6
Source File: NAryUnionPlanNode.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * @param template
 */
public NAryUnionPlanNode(BinaryUnionNode template, List<Channel> inputs, GlobalProperties gProps,
		Costs cumulativeCosts)
{
	super(template, "Union", DriverStrategy.NONE);
	
	this.inputs = inputs;
	this.globalProps = gProps;
	this.localProps = new LocalProperties();
	this.nodeCosts = new Costs();
	this.cumulativeCosts = cumulativeCosts;
}
 
Example #7
Source File: BinaryUnionOpDescriptor.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public DualInputPlanNode instantiate(Channel in1, Channel in2, TwoInputNode node) {
	return new BinaryUnionPlanNode((BinaryUnionNode) node, in1, in2);
}
 
Example #8
Source File: BinaryUnionPlanNode.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
/**
 * @param template
 */
public BinaryUnionPlanNode(BinaryUnionNode template, Channel in1, Channel in2) {
	super(template, "Union", in1, in2, DriverStrategy.UNION);
}
 
Example #9
Source File: BinaryUnionPlanNode.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
public BinaryUnionNode getOptimizerNode() {
	return (BinaryUnionNode) this.template;
}
 
Example #10
Source File: BinaryUnionOpDescriptor.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public DualInputPlanNode instantiate(Channel in1, Channel in2, TwoInputNode node) {
	return new BinaryUnionPlanNode((BinaryUnionNode) node, in1, in2);
}
 
Example #11
Source File: BinaryUnionPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
/**
 * @param template
 */
public BinaryUnionPlanNode(BinaryUnionNode template, Channel in1, Channel in2) {
	super(template, "Union", in1, in2, DriverStrategy.UNION);
}
 
Example #12
Source File: BinaryUnionPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
public BinaryUnionNode getOptimizerNode() {
	return (BinaryUnionNode) this.template;
}
 
Example #13
Source File: BinaryUnionOpDescriptor.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public DualInputPlanNode instantiate(Channel in1, Channel in2, TwoInputNode node) {
	return new BinaryUnionPlanNode((BinaryUnionNode) node, in1, in2);
}
 
Example #14
Source File: BinaryUnionPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
/**
 * @param template
 */
public BinaryUnionPlanNode(BinaryUnionNode template, Channel in1, Channel in2) {
	super(template, "Union", in1, in2, DriverStrategy.UNION);
}
 
Example #15
Source File: BinaryUnionPlanNode.java    From flink with Apache License 2.0 4 votes vote down vote up
public BinaryUnionNode getOptimizerNode() {
	return (BinaryUnionNode) this.template;
}