cameronlee314 commented on a change in pull request #1027: SAMZA-2046:
Startpoint fan out implementation
URL: https://github.com/apache/samza/pull/1027#discussion_r284821797
##########
File path:
samza-core/src/main/java/org/apache/samza/startpoint/StartpointObjectMapper.java
##########
@@ -39,12 +40,16 @@ static ObjectMapper getObjectMapper() {
SimpleModule module = new SimpleModule("StartpointModule", new Version(1,
0, 0, ""));
module.addSerializer(Instant.class, new CustomInstantSerializer());
module.addDeserializer(Instant.class, new CustomInstantDeserializer());
-
objectMapper.registerModule(module);
- objectMapper.registerSubtypes(StartpointSpecific.class);
- objectMapper.registerSubtypes(StartpointTimestamp.class);
- objectMapper.registerSubtypes(StartpointUpcoming.class);
- objectMapper.registerSubtypes(StartpointOldest.class);
+
+ // 1. To support polymorphism for serialization, the Startpoint subtypes
must be registered here.
+ // 2. The NamedType container class provides a logical name as an external
identifier so that the full canonical
Review comment:
Sounds good. Just wanted to make sure there wasn't any gotcha with using the
new way. I didn't need it to be easier than the old way. It's good that it
makes the serialization more compact.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services