jon-wei 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_r219597444
##########
File path: api/src/main/java/org/apache/druid/indexer/TaskStatusPlus.java
##########
@@ -59,15 +91,27 @@ public TaskStatusPlus(
@JsonProperty("errorMsg") @Nullable String errorMsg
)
{
- if (state != null && state.isComplete()) {
+ if (statusCode != null && statusCode.isComplete()) {
Preconditions.checkNotNull(duration, "duration");
}
this.id = Preconditions.checkNotNull(id, "id");
this.type = type;
this.createdTime = Preconditions.checkNotNull(createdTime, "createdTime");
this.queueInsertionTime = Preconditions.checkNotNull(queueInsertionTime,
"queueInsertionTime");
- this.state = state;
- this.status = status;
+ //checks for deserialization safety
+ if (statusCode != null && status == null) {
+ this.state = statusCode;
Review comment:
let's rename `state` to `statusCode`
----------------------------------------------------------------
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]