(String[] args)
| 18 | public 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 | } |
nothing calls this directly
no test coverage detected