kaibozhou 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_r393752656
##########
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:
Or log.debug("Request file named {} upload.", fileName); ?
----------------------------------------------------------------
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