GJL commented on a change in pull request #11250: [FLINK-16302][rest]add log 
list and read log by name for taskmanager
URL: https://github.com/apache/flink/pull/11250#discussion_r390183535
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
 ##########
 @@ -900,7 +921,7 @@ public void heartbeatFromResourceManager(ResourceID 
resourceID) {
        }
 
        @Override
-       public CompletableFuture<TransientBlobKey> requestFileUpload(FileType 
fileType, Time timeout) {
+       public CompletableFuture<TransientBlobKey> requestFileUpload(FileType 
fileType, String fileName, Time timeout) {
 
 Review comment:
   I think this method signature is hard to understand. Let me summarize:
   - If `fileType` is `LOG` or `STDOUT`,  `fileName` will be `taskmanager.log` 
or `taskmanager.out`, respectively. However, `fileName` can be ignored because 
the file to be uploaded will be determined by `taskmanagerConfiguration`).
   - If `fileType` is `CUSTOM`, the value of `fileName` should be used.
   
   That is, the task fulfilled by of this method changes depending on the 
method arguments. Moreover, just by looking at the signature it is unclear what 
this method does. This is normally a hint to split the methods:
   
   ```
   CompletableFuture<TransientBlobKey> requestFileUpload(String fileName, 
@RpcTimeout Time timeout);
   
   CompletableFuture<TransientBlobKey> requestFileUpload(FileType fileType, 
@RpcTimeout Time timeout);
   ```
   I think the same applies for `ResourceManagerGateway`. WDYT?
   

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

Reply via email to