You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/07/26 05:20:41 UTC

[GitHub] [flink] pltbkd commented on a diff in pull request #20296: [FLINK-28588] Enhance REST API for Speculative Execution

pltbkd commented on code in PR #20296:
URL: https://github.com/apache/flink/pull/20296#discussion_r929534318


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/taskmanager/TaskManagerInfo.java:
##########
@@ -113,7 +123,8 @@ public TaskManagerInfo(
             @JsonProperty(FIELD_NAME_TOTAL_RESOURCE) ResourceProfileInfo totalResource,
             @JsonProperty(FIELD_NAME_AVAILABLE_RESOURCE) ResourceProfileInfo freeResource,
             @JsonProperty(FIELD_NAME_HARDWARE) HardwareDescription hardwareDescription,
-            @JsonProperty(FIELD_NAME_MEMORY) TaskExecutorMemoryConfiguration memoryConfiguration) {
+            @JsonProperty(FIELD_NAME_MEMORY) TaskExecutorMemoryConfiguration memoryConfiguration,
+            @JsonProperty(FIELD_NAME_BLOCKED) @Nullable Boolean blocked) {

Review Comment:
   With @JsonInclude(Include.NON_DEFAULT), the json may not include the blocked field when it's false. We add the annotation since we don't want to change the REST API reponse for non speculative execution users.
   While when deserializing, jackson will try to apply a null to the field when the field is absent, and it will cause exception if the field is a boolean.



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org