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

ASF GitHub Bot commented on FLINK-1676:
---------------------------------------

Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/473#discussion_r26170417
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/typeutils/PojoTypeInfo.java 
---
    @@ -310,6 +310,9 @@ public int getFieldIndex(String fieldName) {
     
        @Override
        public TypeSerializer<T> createSerializer(ExecutionConfig config) {
    +           if(config.isForceKryoEnabled()) {
    +                   return new 
GenericTypeInfo<T>(this.typeClass).createSerializer(config);
    --- End diff --
    
    Yes, that would save the creation of the GenericTypeInfo.
    I did it like this because the createSerializer() method of the 
GenericTypeInfo is again configurable, creating a Kryo or Avro serializer, 
depending on the execution config.
    But I can also pull the Kryo/Avro switch to the PojoTypeInfo if you think 
that's nicer.


> enableForceKryo() is not working as expected
> --------------------------------------------
>
>                 Key: FLINK-1676
>                 URL: https://issues.apache.org/jira/browse/FLINK-1676
>             Project: Flink
>          Issue Type: Bug
>          Components: Java API
>    Affects Versions: 0.9
>            Reporter: Robert Metzger
>
> I my Flink job, I've set the following execution config
> {code}
> final ExecutionEnvironment env = 
> ExecutionEnvironment.getExecutionEnvironment();
> env.getConfig().disableObjectReuse();
> env.getConfig().enableForceKryo();
> {code}
> Setting a breakpoint in the {{PojoSerializer()}} constructor, you'll see that 
> we still serialize data with the POJO serializer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to