[ 
https://issues.apache.org/jira/browse/FLINK-4624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15505926#comment-15505926
 ] 

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: 
{code:java}
TypeInformation<K> keyType = ((TupleTypeInfo<?>) 
input.getVertices().getType()).getTypeAt(0);
TypeInformation<VV> valueType = ((TupleTypeInfo<?>) 
input.getVertices().getType()).getTypeAt(1);
EitherTypeInfo<VV, NullValue> eitherType = new EitherTypeInfo<>(valueType, 
TypeInformation.of(NullValue.class));
TupleTypeInfo<VertexGroupItem<K, VV>> tupleTypeInfo = new 
TupleTypeInfo<>(keyType, keyType, eitherType, BasicTypeInfo.LONG_TYPE_INFO);
{code}
(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
(v6.3.4#6332)

Reply via email to