jihoonson commented on a change in pull request #6334: make 0.13 tasks API 
backwards compatible with 0.12  (#6333)
URL: https://github.com/apache/incubator-druid/pull/6334#discussion_r221415768
 
 

 ##########
 File path: api/src/main/java/org/apache/druid/indexer/TaskStatusPlus.java
 ##########
 @@ -22,18 +22,23 @@
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.google.common.base.Preconditions;
+import org.apache.druid.java.util.common.logger.Logger;
 import org.joda.time.DateTime;
 
 import javax.annotation.Nullable;
 import java.util.Objects;
 
 public class TaskStatusPlus
 {
+  private static final Logger log = new Logger(TaskStatusPlus.class);
+
   private final String id;
   private final String type;
   private final DateTime createdTime;
   private final DateTime queueInsertionTime;
-  private final TaskState state;
+  private final TaskState statusCode;
+  @Deprecated
+  private final TaskState status;
 
 Review comment:
   I mean, we can only keep `statusCode` in this class but the `@JsonCreator` 
can have both `status` and `statusCode` as its params. Also this class needs to 
have both `getStatus()` and `getStatusCode()` annotated with `@JsonProperty`. 
Then, serialization and deserialization would work. In serialization, both 
`status` and `statusCode` would be in the serialized JSON because we have both 
both `getStatus()` and `getStatusCode()` methods. In deserialization, this 
class can read either `status` or `statusCode` (or both) since the constructor 
accepts both params.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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