I want to do an experiment with the operator "aggregate"

My code is:


Aggregate.java

https://paste.ubuntu.com/p/vvMKqZXt3r/


UserActionLogPOJO.java
https://paste.ubuntu.com/p/rfszzKbxDC/




The error I got is:



Exception in thread "main" 
org.apache.flink.api.common.typeutils.CompositeType$InvalidFieldReferenceException:
 Cannot reference field by field expression on 
GenericType<UserActionLogPOJO&gt;Field expressions are only supported on POJO 
types, tuples, and case classes. (See the Flink documentation on what is 
considered a POJO.)
&nbsp;&nbsp; &nbsp;at 
org.apache.flink.streaming.util.typeutils.FieldAccessorFactory.getAccessor(FieldAccessorFactory.java:193)
&nbsp;&nbsp; &nbsp;at 
org.apache.flink.streaming.api.functions.aggregation.ComparableAggregator.<init&gt;(ComparableAggregator.java:67)
&nbsp;&nbsp; &nbsp;at 
org.apache.flink.streaming.api.datastream.KeyedStream.max(KeyedStream.java:836)
&nbsp;&nbsp; &nbsp;at Aggregate.main(Aggregate.java:52)

Process finished with exit code 1

Could you tell me where I am wrong with UserActionLogPOJO.java?

Thanks for your help

Reply via email to