Closed Zainab-Abbas closed 8 years ago
Hey @Zainab-Abbas,
I cannot reproduce this. Can you give us some details on how you're trying to run the example? In your IDE or from the command line? Do you give input or you use default arguments?
Thanks!
if i do not give any parameters it takes the default ones right ?
I found the cause of the error and I'll push a fix. Thanks @Zainab-Abbas!
good catch!
Error:
Exception in thread "main" org.apache.flink.api.common.functions.InvalidTypesException: The return type of function 'run(WindowGraphAggregation.java:59)' could not be determined automatically, due to type erasure. You can give type information hints by using the returns(...) method on the result of the transformation call, or by letting your function implement the 'ResultTypeQueryable' interface. at org.apache.flink.streaming.api.transformations.StreamTransformation.getOutputType(StreamTransformation.java:211) at org.apache.flink.streaming.api.datastream.DataStream.getType(DataStream.java:139) at org.apache.flink.streaming.api.datastream.DataStream.flatMap(DataStream.java:575) at org.apache.flink.graph.streaming.WindowGraphAggregation.run(WindowGraphAggregation.java:59) at org.apache.flink.graph.streaming.SimpleEdgeStream.aggregate(SimpleEdgeStream.java:105) at org.apache.flink.graph.streaming.example.ConnectedComponents.main(ConnectedComponents.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: org.apache.flink.api.common.functions.InvalidTypesException: The types of the interface org.apache.flink.api.common.functions.FoldFunction could not be inferred. Support for synthetic interfaces, lambdas, and generic or raw types is limited at this point at org.apache.flink.api.java.typeutils.TypeExtractor.getParameterType(TypeExtractor.java:708) at org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:366) at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfo(TypeExtractor.java:346) at org.apache.flink.graph.streaming.WindowGraphAggregation$PartialAgg.getProducedType(WindowGraphAggregation.java:99) at org.apache.flink.api.java.typeutils.TypeExtractor.getUnaryOperatorReturnType(TypeExtractor.java:278) at org.apache.flink.api.java.typeutils.TypeExtractor.getFoldReturnTypes(TypeExtractor.java:131) at org.apache.flink.streaming.api.datastream.WindowedStream.fold(WindowedStream.java:193) ... 8 more