afedulov commented on code in PR #19228:
URL: https://github.com/apache/flink/pull/19228#discussion_r853515736


##########
flink-runtime/src/main/java/org/apache/flink/runtime/messages/ThreadInfoSample.java:
##########
@@ -54,6 +61,27 @@ private ThreadInfoSample(Thread.State threadState, 
StackTraceElement[] stackTrac
         }
     }
 
+    /**
+     * Constructs a collection of {@link ThreadInfoSample}s from a {@link 
ThreadInfo} array.
+     *
+     * @param threadInfos {@link ThreadInfo} array where the data will be 
copied from.
+     * @return a Collection of the corresponding {@link ThreadInfoSample}s
+     */
+    public static Collection<ThreadInfoSample> from(ThreadInfo[] threadInfos) {

Review Comment:
   There is now also a `long[] requestedThreadIds` used for more specific 
null-results handling which makes using streams a bit cumbersome (unless we 
already have some library as a dependency that has support for "zipping" 
streams?). 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to