Package org.apache.flink.runtime.util
Class JvmUtils
- java.lang.Object
-
- org.apache.flink.runtime.util.JvmUtils
-
public final class JvmUtils extends Object
Utilities forManagementFactory
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<ThreadInfo>
createThreadDump()
Creates a thread dump of the current JVM.static Optional<ThreadInfoSample>
createThreadInfoSample(long threadId, int maxStackTraceDepth)
Creates aThreadInfoSample
for a specific thread.static Map<Long,ThreadInfoSample>
createThreadInfoSample(Collection<Long> threadIds, int maxStackTraceDepth)
Creates aThreadInfoSample
for a specific thread.
-
-
-
Method Detail
-
createThreadDump
public static Collection<ThreadInfo> 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 aThreadInfoSample
for 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 aThreadInfoSample
for 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.
-
-