MCPcopy Create free account
hub / github.com/apache/storm / processPid

Method processPid

storm-client/src/jvm/org/apache/storm/utils/Utils.java:1011–1018  ·  view source on GitHub ↗

Get process PID. @return the pid of this JVM, because Java doesn't provide a real way to do this.

()

Source from the content-addressed store, hash-verified

1009 * @return the pid of this JVM, because Java doesn't provide a real way to do this.
1010 */
1011 public static String processPid() {
1012 String name = ManagementFactory.getRuntimeMXBean().getName();
1013 String[] split = name.split("@");
1014 if (split.length != 2) {
1015 throw new RuntimeException("Got unexpected process name: " + name);
1016 }
1017 return split[0];
1018 }
1019
1020 public static Map<String, Object> fromCompressedJsonConf(byte[] serialized) {
1021 try {

Callers 1

startMethod · 0.95

Calls 1

getNameMethod · 0.65

Tested by

no test coverage detected