Package org.apache.storm.perf.utils

## Class Helper

- java.lang.Object
- - org.apache.storm.perf.utils.Helper

-     public class Helper
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Helper()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `collectMetricsAndKill​(String topologyName, Integer pollInterval, int duration)` |
    `static int` | `getInt​(Map map, Object key, int def)` |
    `static String` | `getStr​(Map map, Object key)` |
    `static void` | `kill​(Nimbus.Iface client, String topoName)` |
    `static void` | `runOnClusterAndPrintMetrics​(int durationSec, String topoName, Map<String,​Object> topoConf, StormTopology topology)` |
    `static void` | `setupShutdownHook​(String topoName)` | Kill topo on Ctrl-C.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Helper

          public Helper()

  - ### Method Detail

    - #### kill

          public static void kill​(Nimbus.Iface client,
                                  String topoName)
                           throws Exception

      Throws:
        `Exception`

    - #### getInt

          public static int getInt​(Map map,
                                   Object key,
                                   int def)

    - #### getStr

          public static String getStr​(Map map,
                                      Object key)

    - #### collectMetricsAndKill

          public static void collectMetricsAndKill​(String topologyName,
                                                   Integer pollInterval,
                                                   int duration)
                                            throws Exception

      Throws:
        `Exception`

    - #### setupShutdownHook

          public static void setupShutdownHook​(String topoName)

      Kill topo on Ctrl-C.

    - #### runOnClusterAndPrintMetrics

          public static void runOnClusterAndPrintMetrics​(int durationSec,
                                                         String topoName,
                                                         Map<String,​Object> topoConf,
                                                         StormTopology topology)
                                                  throws Exception

      Throws:
        `Exception`