org.apache.flink.api.java.typeutils.runtime.PojoComparator Java Examples
The following examples show how to use
org.apache.flink.api.java.typeutils.runtime.PojoComparator.
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: PojoTypeInfo.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override public TypeComparator<T> createTypeComparator(ExecutionConfig config) { checkState( keyFields.size() > 0, "No keys were defined for the PojoTypeComparatorBuilder."); checkState( fieldComparators.size() > 0, "No type comparators were defined for the PojoTypeComparatorBuilder."); checkState( keyFields.size() == fieldComparators.size(), "Number of key fields and field comparators is not equal."); return new PojoComparator<T>( keyFields.toArray(new Field[keyFields.size()]), fieldComparators.toArray(new TypeComparator[fieldComparators.size()]), createSerializer(config), getTypeClass()); }
Example #2
Source File: PojoTypeInfo.java From flink with Apache License 2.0 | 6 votes |
@Override public TypeComparator<T> createTypeComparator(ExecutionConfig config) { checkState( keyFields.size() > 0, "No keys were defined for the PojoTypeComparatorBuilder."); checkState( fieldComparators.size() > 0, "No type comparators were defined for the PojoTypeComparatorBuilder."); checkState( keyFields.size() == fieldComparators.size(), "Number of key fields and field comparators is not equal."); return new PojoComparator<T>( keyFields.toArray(new Field[keyFields.size()]), fieldComparators.toArray(new TypeComparator[fieldComparators.size()]), createSerializer(config), getTypeClass()); }
Example #3
Source File: PojoTypeInfo.java From flink with Apache License 2.0 | 6 votes |
@Override public TypeComparator<T> createTypeComparator(ExecutionConfig config) { checkState( keyFields.size() > 0, "No keys were defined for the PojoTypeComparatorBuilder."); checkState( fieldComparators.size() > 0, "No type comparators were defined for the PojoTypeComparatorBuilder."); checkState( keyFields.size() == fieldComparators.size(), "Number of key fields and field comparators is not equal."); return new PojoComparator<T>( keyFields.toArray(new Field[keyFields.size()]), fieldComparators.toArray(new TypeComparator[fieldComparators.size()]), createSerializer(config), getTypeClass()); }