本文整理汇总了Java中org.apache.flink.api.common.typeinfo.NothingTypeInfo类的典型用法代码示例。如果您正苦于以下问题:Java NothingTypeInfo类的具体用法?Java NothingTypeInfo怎么用?Java NothingTypeInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NothingTypeInfo类属于org.apache.flink.api.common.typeinfo包,在下文中一共展示了NothingTypeInfo类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: translateToDataFlow
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
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<T>(this.format, new UnaryOperatorInformation<T, Nothing>(this.type, new NothingTypeInfo()), name);
// set input
sink.setInput(input);
// set dop
if(this.dop > 0) {
// use specified dop
sink.setDegreeOfParallelism(this.dop);
} else {
// if no dop has been specified, use dop of input operator to enable chaining
sink.setDegreeOfParallelism(input.getDegreeOfParallelism());
}
return sink;
}
示例2: translateToDataFlow
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
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;
}
示例3: testNothingTypeInfoEquality
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
@Test
public void testNothingTypeInfoEquality() {
NothingTypeInfo tpeInfo1 = new NothingTypeInfo();
NothingTypeInfo tpeInfo2 = new NothingTypeInfo();
assertEquals(tpeInfo1, tpeInfo2);
assertEquals(tpeInfo1.hashCode(), tpeInfo2.hashCode());
}
示例4: testNothingTypeInfoInequality
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
@Test
public void testNothingTypeInfoInequality() {
NothingTypeInfo tpeInfo1 = new NothingTypeInfo();
BasicTypeInfo<Integer> tpeInfo2 = BasicTypeInfo.getInfoFor(Integer.class);
assertNotEquals(tpeInfo1, tpeInfo2);
assertNotEquals(tpeInfo2, tpeInfo1);
}
示例5: SinkJoiner
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
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);
}
示例6: SinkJoiner
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
public SinkJoiner(OptimizerNode input1, OptimizerNode input2) {
super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
PactConnection conn1 = new PactConnection(input1, this);
PactConnection conn2 = new PactConnection(input2, this);
this.input1 = conn1;
this.input2 = conn2;
setDegreeOfParallelism(1);
}
示例7: SingleRootJoiner
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
SingleRootJoiner() {
super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
setParallelism(1);
}
示例8: SingleRootJoiner
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
SingleRootJoiner() {
super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
setDegreeOfParallelism(1);
}
示例9: FileDataSink
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
/**
* Creates a FileDataSink with the provided {@link FileOutputFormat} implementation
* and the given name, writing to the file indicated by the given path.
*
* @param f The {@link FileOutputFormat} implementation used to encode the data.
* @param filePath The path to the file to write the contents to.
* @param name The given name for the sink, used in plans, logs and progress messages.
*/
public FileDataSink(FileOutputFormat<Record> f, String filePath, String name) {
super(f, new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), filePath, name);
}
示例10: GenericDataSink
import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
/**
* Creates a GenericDataSink with the provided {@link OutputFormat} implementation
* and the given name.
*
* @param f The {@link OutputFormat} implementation used to sink the data.
* @param name The given name for the sink, used in plans, logs and progress messages.
*/
public GenericDataSink(OutputFormat<Record> f, String name) {
super(f, new UnaryOperatorInformation<Record, Nothing>(new RecordTypeInfo(), new NothingTypeInfo()), name);
}