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_r391805526
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
 ##########
 @@ -915,29 +936,21 @@ public void heartbeatFromResourceManager(ResourceID 
resourceID) {
                        default:
                                filePath = null;
                }
+               return requestFileUploadByFilePath(filePath, timeout, 
fileType.toString());
+       }
 
-               if (filePath != null && !filePath.isEmpty()) {
-                       final File file = new File(filePath);
-
-                       if (file.exists()) {
-                               final TransientBlobCache transientBlobService = 
blobCacheService.getTransientBlobService();
-                               final TransientBlobKey transientBlobKey;
-                               try (FileInputStream fileInputStream = new 
FileInputStream(file)) {
-                                       transientBlobKey = 
transientBlobService.putTransient(fileInputStream);
-                               } catch (IOException e) {
-                                       log.debug("Could not upload file {}.", 
fileType, e);
-                                       return 
FutureUtils.completedExceptionally(new FlinkException("Could not upload file " 
+ fileType + '.', e));
-                               }
+       @Override
+       public CompletableFuture<TransientBlobKey> 
requestFileUploadByName(String fileName, Time timeout) {
+               log.debug("Request file name is {} upload.", fileName);
 
 Review comment:
   Log message could be clearer. How about
   
   ```
   log.debug("Received file upload request for file {}", fileName);
   ```
   Also, I think it's enough to log once in `requestFileUploadByFilePath()`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to