当前位置: 首页>>代码示例>>Java>>正文


Java NothingTypeInfo类代码示例

本文整理汇总了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;
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:18,代码来源:DataSink.java

示例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;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:31,代码来源:DataSink.java

示例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());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:NothingTypeInfoTest.java

示例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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:NothingTypeInfoTest.java

示例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);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:SinkJoiner.java

示例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);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:12,代码来源:SinkJoiner.java

示例7: SingleRootJoiner

import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
SingleRootJoiner() {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
	
	setParallelism(1);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:6,代码来源:WorksetIterationNode.java

示例8: SingleRootJoiner

import org.apache.flink.api.common.typeinfo.NothingTypeInfo; //导入依赖的package包/类
SingleRootJoiner() {
	super(new NoOpBinaryUdfOp<Nothing>(new NothingTypeInfo()));
	
	setDegreeOfParallelism(1);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:6,代码来源:WorksetIterationNode.java

示例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);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:12,代码来源:FileDataSink.java

示例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);
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:11,代码来源:GenericDataSink.java


注:本文中的org.apache.flink.api.common.typeinfo.NothingTypeInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。