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

Method main

storm-core/src/jvm/org/apache/storm/command/Monitor.java:20–50  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

18public class Monitor {
19
20 public static void main(String[] args) throws Exception {
21 Map<String, Object> cl = CLI.opt("i", "interval", 4, CLI.AS_INT)
22 .opt("m", "component", null)
23 .opt("s", "stream", "default")
24 .opt("w", "watch", "emitted")
25 .arg("topologyName", CLI.FIRST_WINS)
26 .parse(args);
27 final org.apache.storm.utils.Monitor monitor = new org.apache.storm.utils.Monitor();
28 Integer interval = (Integer) cl.get("i");
29 if (null != interval) {
30 monitor.setInterval(interval);
31 }
32 String component = (String) cl.get("m");
33 if (null != component) {
34 monitor.setComponent(component);
35 }
36 String stream = (String) cl.get("s");
37 if (null != stream) {
38 monitor.setStream(stream);
39 }
40 String watch = (String) cl.get("w");
41 if (null != watch) {
42 monitor.setWatch(watch);
43 }
44 String topologyName = (String) cl.get("topologyName");
45 if (null != topologyName) {
46 monitor.setTopology(topologyName);
47 }
48
49 NimbusClient.withConfiguredClient(nimbus -> monitor.metrics(nimbus));
50 }
51}

Callers

nothing calls this directly

Calls 11

optMethod · 0.95
setIntervalMethod · 0.95
setComponentMethod · 0.95
setStreamMethod · 0.95
setWatchMethod · 0.95
setTopologyMethod · 0.95
withConfiguredClientMethod · 0.95
metricsMethod · 0.95
parseMethod · 0.65
getMethod · 0.65
argMethod · 0.45

Tested by

no test coverage detected