Package org.apache.storm.starter

## Class SkewedRollingTopWords

- java.lang.Object
- - org.apache.storm.topology.ConfigurableTopology
  - - org.apache.storm.starter.SkewedRollingTopWords

-     public class SkewedRollingTopWords
      extends ConfigurableTopology

  This topology does a continuous computation of the top N words that the topology has seen in terms of cardinality. The top N computation is done in a completely scalable way, and a similar approach could be used to compute things like trending topics or trending images on Twitter. It takes an approach that assumes that some works will be much more common then other words, and uses partialKeyGrouping to better balance the skewed load.

- - ### Field Summary

    - ### Fields inherited from class org.apache.storm.topology.ConfigurableTopology

      `conf`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `main​(String[] args)` |
    `protected int` | `run​(String[] args)` | Submits (runs) the topology.

    - ### Methods inherited from class org.apache.storm.topology.ConfigurableTopology

      `getConf, loadConf, start, submit, submit`

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

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

- - ### Method Detail

    - #### main

          public static void main​(String[] args)
                           throws Exception

      Throws:
        `Exception`

    - #### run

          protected int run​(String[] args)

      Submits (runs) the topology.

      Usage: "SkewedRollingTopWords [topology-name] [-local]"

      By default, the topology is run locally under the name "slidingWindowCounts".

      Examples:

      ``` # Runs in remote/cluster mode, with topology name "production-topology" $ storm jar storm-starter-jar-with-dependencies.jar org.apache.storm.starter.SkewedRollingTopWords production-topology ```

      Specified by:
        `run` in class `ConfigurableTopology`
      Parameters:
        `args` - First positional argument (optional) is topology name, second positional argument (optional) defines whether to run the topology locally ("-local") or remotely, i.e. on a real cluster