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

Hard to register Kryo Serializers due to generics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.2
    • 1.2.0
    • None
    • None

    Description

      It currently does not work to do this:

      env.registerTypeWithKryoSerializer(TreeMultimap.class, JavaSerializer.class);
      

      instead on needs to do that:

      env.registerTypeWithKryoSerializer(TreeMultimap.class, (Class<? extends Serializer<?>>) JavaSerializer.class);
      

      The fix would be to change the signature of the environment method from

      public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer<?>> serializerClass)
      

      to

      public void registerTypeWithKryoSerializer(Class<?> type, Class<? extends Serializer> serializerClass)
      

      Attachments

        Activity

          People

            sewen Stephan Ewen
            sewen Stephan Ewen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: