lamber-ken commented on a change in pull request #11887:
URL: https://github.com/apache/flink/pull/11887#discussion_r415197059



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskExecutor.java
##########
@@ -1012,10 +1016,34 @@ public void disconnectResourceManager(Exception cause) {
                }
        }
 
+       @Override
+       public CompletableFuture<ThreadDumpInfo> requestThreadDump(Time 
timeout) {
+               final Collection<ThreadInfo> threadDump = 
JvmUtils.createThreadDump();
+
+               final Collection<ThreadDumpInfo.ThreadInfo> threadInfos = 
threadDump.stream()
+                       .map(threadInfo -> 
ThreadDumpInfo.ThreadInfo.create(threadInfo.getThreadName(), 
threadInfo.toString()))
+                       .collect(Collectors.toList());
+
+               return 
CompletableFuture.completedFuture(ThreadDumpInfo.create(threadInfos));
+       }
+
        // 
======================================================================
        //  Internal methods
        // 
======================================================================
 
+       private CompletableFuture<TransientBlobKey> 
putTransientBlobStream(InputStream inputStream, String fileTag) {
+               final TransientBlobCache transientBlobService = 
blobCacheService.getTransientBlobService();
+               final TransientBlobKey transientBlobKey;
+
+               try {
+                       transientBlobKey = 
transientBlobService.putTransient(inputStream);
+               } catch (IOException e) {
+                       log.debug("Could not upload file {}.", fileTag, e);
+                       return FutureUtils.completedExceptionally(new 
FlinkException("Could not upload file " + fileTag + '.', e));
+               }
+               return CompletableFuture.completedFuture(transientBlobKey);
+       }
+

Review comment:
       hi @tillrohrmann, since doesn't make thread dump as stream in your 
design right now, we can revert it.




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


Reply via email to