flink-issues mailing list archives

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

    https://github.com/apache/flink/pull/2211#discussion_r69951927
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/java/typeutils/PojoTypeInfo.java
---
    @@ -70,10 +75,21 @@
     	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<Class<?>, Class<? extends TypeComparator>>
customComparators = new HashMap<>();
    +
     	private final PojoField[] fields;
     	
     	private final int totalFields;
     
    +	public static <C, S extends TypeSerializer<C>> void registerCustomSerializer(Class<C>
c, Class<S> s) {
    --- End diff --
    
    Still needs to be documented (and `registerCustomComparator`, but I wanted to note that
it would be good to document the order used in `createSerializer` ... Kyro, Avro, custom,
code-generated.


---
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.
---

Mime
View raw message