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

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/taskmanager/AbstractTaskManagerFileHandler.java
 ##########
 @@ -263,4 +266,8 @@ private void transferFile(ChannelHandlerContext ctx, File 
file, HttpRequest http
                        throw new FlinkException("Could not transfer file " + 
file + " to the client.", ioe);
                }
        }
+
+       protected String getFileName(HandlerRequest<EmptyRequestBody, M> 
handlerRequest) {
+               return null;
 
 Review comment:
   If a user requests STDOUT and then LOG, he will not get STDOUT twice. As 
`fileBlobKeys` is not static, so it's belonging to its object. And I hava test 
it by 
   ```java
   log.info(String.format("fileBlobKeys [%s] cached file for TaskExecutor [%s] 
taskManagerId [%s], blobKey [%s]", fileBlobKeys.toString(), 
taskManagerIdAndFileName, taskManagerId, blobKey.toString()));
   ```
   
   The result is
   ```text
   2020-03-20 11:32:18,582 INFO  
org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerLogFileHandler [] 
- fileBlobKeys 
[org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$LocalLoadingCache@6cfede43]
 cached file for TaskExecutor [(c65f774c537555a1fb64c64f9b1ff18b,null)] 
taskManagerId [c65f774c537555a1fb64c64f9b1ff18b], blobKey 
[t-a8637ce83ae75216ce99399eb59f07c63c53603b-f018c857f158c354d3018f6d03ae2ad6]
   2020-03-20 11:32:24,202 INFO  
org.apache.flink.runtime.rest.handler.taskmanager.TaskManagerStdoutFileHandler 
[] - fileBlobKeys 
[org.apache.flink.shaded.guava18.com.google.common.cache.LocalCache$LocalLoadingCache@76dd5d49]
 cached file for TaskExecutor [(c65f774c537555a1fb64c64f9b1ff18b,null)] 
taskManagerId [c65f774c537555a1fb64c64f9b1ff18b], blobKey 
[t-da39a3ee5e6b4b0d3255bfef95601890afd80709-89a50af389ae582c598680476d832e0d]
   ```

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