org.apache.flink.api.common.typeinfo.NothingTypeInfo Java Examples

The following examples show how to use org.apache.flink.api.common.typeinfo.NothingTypeInfo. 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: DataSink.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
protected GenericDataSinkBase<T> translateToDataFlow(Operator<T> input) {
	// select the name (or create a default one)
	String name = this.name != null ? this.name : this.format.toString();
	GenericDataSinkBase<T> sink = new GenericDataSinkBase<>(this.format, new UnaryOperatorInformation<>(this.type, new NothingTypeInfo()), name);
	// set input
	sink.setInput(input);
	// set parameters
	if (this.parameters != null) {
		sink.getParameters().addAll(this.parameters);
	}
	// set parallelism
	if (this.parallelism > 0) {
		// use specified parallelism
		sink.setParallelism(this.parallelism);
	} else {
		// if no parallelism has been specified, use parallelism of input operator to enable chaining
		sink.setParallelism(input.getParallelism());
	}

	if (this.sortKeyPositions != null) {
		// configure output sorting
		Ordering ordering = new Ordering();
		for (int i = 0; i < this.sortKeyPositions.length; i++) {
			ordering.appendOrdering(this.sortKeyPositions[i], null, this.sortOrders[i]);
		}
		sink.setLocalOrder(ordering);
	}

	return sink;
}
 
Example #2
Source File: SinkJoiner.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));

	DagConnection conn1 = new DagConnection(input1, this, null, ExecutionMode.PIPELINED);
	DagConnection conn2 = new DagConnection(input2, this, null, ExecutionMode.PIPELINED);
	
	this.input1 = conn1;
	this.input2 = conn2;
	
	setParallelism(1);
}
 
Example #3
Source File: DataSink.java    From flink with Apache License 2.0 5 votes vote down vote up
protected GenericDataSinkBase<T> translateToDataFlow(Operator<T> input) {
	// select the name (or create a default one)
	String name = this.name != null ? this.name : this.format.toString();
	GenericDataSinkBase<T> sink = new GenericDataSinkBase<>(this.format, new UnaryOperatorInformation<>(this.type, new NothingTypeInfo()), name);
	// set input
	sink.setInput(input);
	// set parameters
	if (this.parameters != null) {
		sink.getParameters().addAll(this.parameters);
	}
	// set parallelism
	if (this.parallelism > 0) {
		// use specified parallelism
		sink.setParallelism(this.parallelism);
	} else {
		// if no parallelism has been specified, use parallelism of input operator to enable chaining
		sink.setParallelism(input.getParallelism());
	}

	if (this.sortKeyPositions != null) {
		// configure output sorting
		Ordering ordering = new Ordering();
		for (int i = 0; i < this.sortKeyPositions.length; i++) {
			ordering.appendOrdering(this.sortKeyPositions[i], null, this.sortOrders[i]);
		}
		sink.setLocalOrder(ordering);
	}

	return sink;
}
 
Example #4
Source File: SinkJoiner.java    From flink with Apache License 2.0 5 votes vote down vote up
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));

	DagConnection conn1 = new DagConnection(input1, this, null, ExecutionMode.PIPELINED);
	DagConnection conn2 = new DagConnection(input2, this, null, ExecutionMode.PIPELINED);
	
	this.input1 = conn1;
	this.input2 = conn2;
	
	setParallelism(1);
}
 
Example #5
Source File: DataSink.java    From flink with Apache License 2.0 5 votes vote down vote up
protected GenericDataSinkBase<T> translateToDataFlow(Operator<T> input) {
	// select the name (or create a default one)
	String name = this.name != null ? this.name : this.format.toString();
	GenericDataSinkBase<T> sink = new GenericDataSinkBase<>(this.format, new UnaryOperatorInformation<>(this.type, new NothingTypeInfo()), name);
	// set input
	sink.setInput(input);
	// set parameters
	if (this.parameters != null) {
		sink.getParameters().addAll(this.parameters);
	}
	// set parallelism
	if (this.parallelism > 0) {
		// use specified parallelism
		sink.setParallelism(this.parallelism);
	} else {
		// if no parallelism has been specified, use parallelism of input operator to enable chaining
		sink.setParallelism(input.getParallelism());
	}

	if (this.sortKeyPositions != null) {
		// configure output sorting
		Ordering ordering = new Ordering();
		for (int i = 0; i < this.sortKeyPositions.length; i++) {
			ordering.appendOrdering(this.sortKeyPositions[i], null, this.sortOrders[i]);
		}
		sink.setLocalOrder(ordering);
	}

	return sink;
}
 
Example #6
Source File: SinkJoiner.java    From flink with Apache License 2.0 5 votes vote down vote up
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));

	DagConnection conn1 = new DagConnection(input1, this, null, ExecutionMode.PIPELINED);
	DagConnection conn2 = new DagConnection(input2, this, null, ExecutionMode.PIPELINED);
	
	this.input1 = conn1;
	this.input2 = conn2;
	
	setParallelism(1);
}
 
Example #7
Source File: WorksetIterationNode.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
SingleRootJoiner() {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
	
	setParallelism(1);
}
 
Example #8
Source File: WorksetIterationNode.java    From flink with Apache License 2.0 4 votes vote down vote up
SingleRootJoiner() {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
	
	setParallelism(1);
}
 
Example #9
Source File: WorksetIterationNode.java    From flink with Apache License 2.0 4 votes vote down vote up
SingleRootJoiner() {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
	
	setParallelism(1);
}