flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggevay <...@git.apache.org>
Subject [GitHub] flink pull request #2211: [WIP][FLINK-3599] Code generation for PojoSerializ...
Date Thu, 08 Sep 2016 11:21:09 GMT
Github user ggevay commented on a diff in the pull request:

    --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/PojoTypeInfo.java
    @@ -70,10 +77,41 @@
     	private static final Pattern PATTERN_NESTED_FIELDS = Pattern.compile(REGEX_NESTED_FIELDS);
     	private static final Pattern PATTERN_NESTED_FIELDS_WILDCARD = Pattern.compile(REGEX_NESTED_FIELDS_WILDCARD);
    +	private static final Map<Class<?>, Class<? extends TypeSerializer>>
customSerializers = new HashMap<>();
    +	private static final Map<Tuple2<ArrayList<Integer>, Class>, Class<?
extends TypeComparator>> customComparators =
    +		new HashMap<>();
     	private final PojoField[] fields;
     	private final int totalFields;
    +	/**
    +	 * Register a custom serializer for a type. The precedence of the serializers
    +	 * is the following (highest to lowest): Kryo, Avro, Custom, Generated, Flink.
    +	 * The chosen serializer will be the first one from the list that is turned on.
    --- End diff --
    I'm also not sure about putting "Custom" after "Kryo" and "Avro". The reason for having
a custom serializer is kind of that I want to bypass all this mess. Or to reason from an other
angle, why would I have a custom serializer, if it doesn't work, and Kryo has to take over?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message