Java Code Examples for org.apache.flink.types.NullValue#getInstance()

The following examples show how to use org.apache.flink.types.NullValue#getInstance() . 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: NullValueArraySerializerTest.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
protected NullValueArray[] getTestData() {
	NullValue nv = NullValue.getInstance();

	NullValueArray nva0 = new NullValueArray();

	NullValueArray nva1 = new NullValueArray();
	nva1.addAll(nva0);
	nva1.add(nv);

	NullValueArray nva2 = new NullValueArray();
	nva2.addAll(nva1);
	nva2.add(nv);

	NullValueArray nva3 = new NullValueArray();
	nva3.addAll(nva2);
	for (int i = 0; i < 100; i++) {
		nva3.add(nv);
	}
	nva3.addAll(nva3);

	return new NullValueArray[] {nva0, nva1, nva2, nva3};
}
 
Example 2
Source File: ToNullValueTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Test
public void testTranslation() throws Exception {
	NullValue reuse = NullValue.getInstance();

	assertEquals(NullValue.getInstance(), new ToNullValue<>().translate(new DoubleValue(), reuse));
	assertEquals(NullValue.getInstance(), new ToNullValue<>().translate(new FloatValue(), reuse));
	assertEquals(NullValue.getInstance(), new ToNullValue<>().translate(new IntValue(), reuse));
	assertEquals(NullValue.getInstance(), new ToNullValue<>().translate(new LongValue(), reuse));
	assertEquals(NullValue.getInstance(), new ToNullValue<>().translate(new StringValue(), reuse));
}
 
Example 3
Source File: ConnectedComponentsWithRandomisedEdgesITCase.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
public Edge<Long, NullValue> map(String value) {
	String[] nums = value.split(" ");
	return new Edge<>(Long.parseLong(nums[0]), Long.parseLong(nums[1]),
			NullValue.getInstance());
}
 
Example 4
Source File: BasicTypeSerializerUpgradeTestSpecifications.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue createTestData() {
	return NullValue.getInstance();
}
 
Example 5
Source File: WindowTriangles.java    From gelly-streaming with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue map(Edge<Long, Long> edge) {
	return NullValue.getInstance();
}
 
Example 6
Source File: NullValueArray.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue next() {
	pos++;
	return NullValue.getInstance();
}
 
Example 7
Source File: GatherSumApplyITCase.java    From flink with Apache License 2.0 4 votes vote down vote up
public NullValue map(Long value) {
	return NullValue.getInstance();
}
 
Example 8
Source File: NullValueSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue deserialize(NullValue reuse, DataInputView source) throws IOException {
	return NullValue.getInstance();
}
 
Example 9
Source File: NullValueSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue deserialize(DataInputView source) throws IOException {
	return NullValue.getInstance();
}
 
Example 10
Source File: NullValueSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue deserialize(NullValue reuse, DataInputView source) throws IOException {
	return NullValue.getInstance();
}
 
Example 11
Source File: NullValueSerializer.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue copy(NullValue from) {
	return NullValue.getInstance();
}
 
Example 12
Source File: ToNullValue.java    From flink with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue translate(T value, NullValue reuse)
		throws Exception {
	return NullValue.getInstance();
}
 
Example 13
Source File: NullValueSerializer.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue createInstance() {
	return NullValue.getInstance();
}
 
Example 14
Source File: ToNullValue.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue translate(T value, NullValue reuse)
		throws Exception {
	return NullValue.getInstance();
}
 
Example 15
Source File: NullValueArray.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue next() {
	pos++;
	return NullValue.getInstance();
}
 
Example 16
Source File: GatherSumApplyITCase.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
public NullValue map(Long value) {
	return NullValue.getInstance();
}
 
Example 17
Source File: NullValueSerializer.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue deserialize(NullValue reuse, DataInputView source) throws IOException {
	return NullValue.getInstance();
}
 
Example 18
Source File: ConnectedComponentsWithRandomisedEdgesITCase.java    From flink with Apache License 2.0 4 votes vote down vote up
public Edge<Long, NullValue> map(String value) {
	String[] nums = value.split(" ");
	return new Edge<>(Long.parseLong(nums[0]), Long.parseLong(nums[1]),
			NullValue.getInstance());
}
 
Example 19
Source File: NullValueSerializer.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue copy(NullValue from, NullValue reuse) {
	return NullValue.getInstance();
}
 
Example 20
Source File: NullValueSerializer.java    From Flink-CEPplus with Apache License 2.0 4 votes vote down vote up
@Override
public NullValue copy(NullValue from) {
	return NullValue.getInstance();
}