org.apache.flink.streaming.util.typeutils.FieldAccessorFactory Java Examples

The following examples show how to use org.apache.flink.streaming.util.typeutils.FieldAccessorFactory. 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: SumAggregator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public SumAggregator(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, pos, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #2
Source File: SumAggregator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public SumAggregator(String field, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, field, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #3
Source File: ComparableAggregator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(int positionToAggregate,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, positionToAggregate, config), first);
}
 
Example #4
Source File: ComparableAggregator.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(String field,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, field, config), first);
}
 
Example #5
Source File: SumAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public SumAggregator(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, pos, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #6
Source File: SumAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public SumAggregator(String field, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, field, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #7
Source File: ComparableAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(int positionToAggregate,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, positionToAggregate, config), first);
}
 
Example #8
Source File: ComparableAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(String field,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, field, config), first);
}
 
Example #9
Source File: SumAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public SumAggregator(int pos, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, pos, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #10
Source File: SumAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public SumAggregator(String field, TypeInformation<T> typeInfo, ExecutionConfig config) {
	fieldAccessor = FieldAccessorFactory.getAccessor(typeInfo, field, config);
	adder = SumFunction.getForClass(fieldAccessor.getFieldType().getTypeClass());
	if (typeInfo instanceof TupleTypeInfo) {
		isTuple = true;
		serializer = null;
	} else {
		isTuple = false;
		this.serializer = typeInfo.createSerializer(config);
	}
}
 
Example #11
Source File: ComparableAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(int positionToAggregate,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, positionToAggregate, config), first);
}
 
Example #12
Source File: ComparableAggregator.java    From flink with Apache License 2.0 5 votes vote down vote up
public ComparableAggregator(String field,
		TypeInformation<T> typeInfo,
		AggregationType aggregationType,
		boolean first,
		ExecutionConfig config) {
	this(aggregationType, FieldAccessorFactory.getAccessor(typeInfo, field, config), first);
}