Martin Junghanns commented on FLINK-4624:

You were right, I had a private member in the UDF for object reuse which caused 
the serialization issue. The Either type now works as expected. However, since 
I now need to add return type information, I am running into another issue.

This is how I create the type info: 
TypeInformation<K> keyType = ((TupleTypeInfo<?>) 
TypeInformation<VV> valueType = ((TupleTypeInfo<?>) 
EitherTypeInfo<VV, NullValue> eitherType = new EitherTypeInfo<>(valueType, 
TupleTypeInfo<VertexGroupItem<K, VV>> tupleTypeInfo = new 
TupleTypeInfo<>(keyType, keyType, eitherType, BasicTypeInfo.LONG_TYPE_INFO);
(which for example leads to "Java *Tuple4*<Long, Long, Either <Long, 
ValueType<NullValue>>, Long>" according to the debugger)

The first transformation (GroupReduce) that produces these tuples returns that 
type. A subsequent filter transformation fails with:

{{java.lang.ClassCastException: org.apache.flink.api.java.tuple.Tuple4 cannot 
be cast to org.apache.flink.graph.library.Summarization$VertexGroupItem}}

Adding the return type info to the filter did not help. Any ideas? Thanks for 
your help.

> Gelly's summarization algorithm cannot deal with null vertex group values
> -------------------------------------------------------------------------
>                 Key: FLINK-4624
>                 URL: https://issues.apache.org/jira/browse/FLINK-4624
>             Project: Flink
>          Issue Type: Bug
>          Components: Gelly
>            Reporter: Till Rohrmann
>            Assignee: Martin Junghanns
>             Fix For: 1.2.0
> Gelly's {{Summarization}} algorithm cannot handle null values in the 
> `VertexGroupItem.f2`. This behaviour is hidden by using Strings as a vertex 
> value in the {{SummarizationITCase}}, because the {{StringSerializer}} can 
> handle null values. 

This message was sent by Atlassian JIRA

Reply via email to