Package org.apache.flink.runtime.util
Class JvmUtils
java.lang.Object
org.apache.flink.runtime.util.JvmUtils
Utilities for
ManagementFactory.-
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<ThreadInfo>Creates a thread dump of the current JVM.static Optional<ThreadInfoSample>createThreadInfoSample(long threadId, int maxStackTraceDepth) Creates aThreadInfoSamplefor a specific thread.static Map<Long,ThreadInfoSample> createThreadInfoSample(Collection<Long> threadIds, int maxStackTraceDepth) Creates aThreadInfoSamplefor a specific thread.
-
Method Details
-
createThreadDump
Creates a thread dump of the current JVM.- Returns:
- the thread dump of current JVM
-
createThreadInfoSample
public static Optional<ThreadInfoSample> createThreadInfoSample(long threadId, int maxStackTraceDepth) Creates aThreadInfoSamplefor a specific thread. Contains thread traces if maxStackTraceDepth > 0.- Parameters:
threadId- The ID of the thread to create the thread dump for.maxStackTraceDepth- The maximum number of entries in the stack trace to be collected.- Returns:
- The thread information of a specific thread.
-
createThreadInfoSample
public static Map<Long,ThreadInfoSample> createThreadInfoSample(Collection<Long> threadIds, int maxStackTraceDepth) Creates aThreadInfoSamplefor a specific thread. Contains thread traces if maxStackTraceDepth > 0.- Parameters:
threadIds- The IDs of the threads to create the thread dump for.maxStackTraceDepth- The maximum number of entries in the stack trace to be collected.- Returns:
- The map key is the thread id, the map value is the thread information for the requested thread IDs.
-