cameronlee314 commented on a change in pull request #1027: SAMZA-2046: 
Startpoint fan out implementation
URL: https://github.com/apache/samza/pull/1027#discussion_r284796109
 
 

 ##########
 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:
   Just double checking: Does the "logical name" allow for easily adding new 
types in the future? Is there a certain way new types need to be added? For 
example, if the "logical name" is just a counter, then we would need to add a 
new subtype at the end of the list.

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

Reply via email to