gianm commented on a change in pull request #8905: Retrying with a backward 
compatible task type on unknown task type error in parallel indexing
URL: https://github.com/apache/incubator-druid/pull/8905#discussion_r348227795
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseSubTaskSpec.java
 ##########
 @@ -66,4 +66,28 @@ public SinglePhaseSubTask newSubTask(int numAttempts)
         new DummyForInjectionAppenderatorsManager()
     );
   }
+
+  @Override
+  public SinglePhaseSubTask newSubTaskWithBackwardCompatibleType(int 
numAttempts)
+  {
+    return new SinglePhaseSubTask(
+        null,
+        getGroupId(),
+        null,
+        getSupervisorTaskId(),
+        numAttempts,
+        getIngestionSpec(),
+        getContext(),
+        null,
+        null,
+        new DummyForInjectionAppenderatorsManager()
+    )
+    {
+      @Override
+      public String getType()
+      {
+        return SinglePhaseSubTask.OLD_TYPE_NAME;
 
 Review comment:
   Will this really affect how the task is serialized? I thought the `type` 
field would end up based solely on whatever Jackson thinks the type code for 
that class is, based on `@JsonTypeName` or `@JsonSubTypes` annotations.
   
   Could you include a test that makes sure it serializes correctly? (Maybe 
serialize it, then deserialize as a Map and check the `type` field.)

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to