1996fanrui commented on code in PR #25113:
URL: https://github.com/apache/flink/pull/25113#discussion_r1690930831


##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManagerGateway.java:
##########
@@ -88,7 +88,22 @@ CompletableFuture<RegistrationResponse> registerJobMaster(
     CompletableFuture<Acknowledge> declareRequiredResources(
             JobMasterId jobMasterId,
             ResourceRequirements resourceRequirements,
-            @RpcTimeout Time timeout);
+            @RpcTimeout Duration timeout);
+
+    /**
+     * @deprecated Use {@link #declareRequiredResources(JobMasterId, 
ResourceRequirements,
+     *     Duration)}. Declares the absolute resource requirements for a job.
+     * @param jobMasterId id of the JobMaster
+     * @param resourceRequirements resource requirements
+     * @return The confirmation that the requirements have been processed
+     */
+    @Deprecated
+    default CompletableFuture<Acknowledge> declareRequiredResources(

Review Comment:
   We could refactor all callers from Time to Duration. And the old method 
isn't needed anymore. Because it's not public api, we don't need to mark it to  
`@Deprecated`.
   
   Be careful which commit this change belongs to.
   



##########
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolService.java:
##########
@@ -75,21 +76,30 @@ public class DeclarativeSlotPoolService implements 
SlotPoolService {
     @Nullable private String jobManagerAddress;
 
     private State state = State.CREATED;
+    protected ComponentMainThreadExecutor componentMainThreadExecutor;

Review Comment:
   ```suggestion
       protected final ComponentMainThreadExecutor componentMainThreadExecutor;
   ```



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to