Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-7374

Type Erasure in GraphUtils$MapTo

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3.1
    • None
    • None
    • Ubuntu 17.04
      java-8-oracle

    Description

      I got the following exception when executing ConnectedComponents or GSAConnectedComponents algorithm:

      org.apache.flink.api.common.functions.InvalidTypesException: Type of TypeVariable 'O' in 'class org.apache.flink.graph.utils.GraphUtils$MapTo' could not be determined. This is most likely a type erasure problem. The type extraction currently supports types with generic variables only in cases where all variables in the return type can be deduced from the input type(s).
      
      	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfoWithTypeHierarchy(TypeExtractor.java:915)
      	at org.apache.flink.api.java.typeutils.TypeExtractor.privateCreateTypeInfo(TypeExtractor.java:836)
      	at org.apache.flink.api.java.typeutils.TypeExtractor.createTypeInfo(TypeExtractor.java:802)
      	at org.apache.flink.graph.Graph.mapEdges(Graph.java:544)
      	at org.apache.flink.graph.library.ConnectedComponents.run(ConnectedComponents.java:76)
      	at org.apache.flink.graph.library.ConnectedComponents.run(ConnectedComponents.java:51)
      	at org.apache.flink.graph.Graph.run(Graph.java:1792)
      

      I copied code that is used to test the ConnectedComponents algorithm from flink/flink-libraries/flink-gelly/src/test/java/org/apache/flink/graph/library/ConnectedComponentsWithRandomisedEdgesITCase.java to try it on another path, because my own code which converts a Gradoop Graph into a Gelly graph and executes the algorithm leads to the afformentioned exception.
      However, even the testcode gave me the exception.

      Any ideas?

      Attachments

        Activity

          People

            Unassigned Unassigned
            merando Matthias Kricke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: