Emre
Emre

Reputation: 1103

How to start Apache Storm UI from Java code?

I develop a stream processing project with Storm. I created a topology and run it by executing the Main class of my project.

In Storm tutorials, I saw a UI that is accessed from 8080 port and it shows detailed information for spouts and bolts. But, I couldn't find a way to start the UI. How can I do that?


pom.xml file:

<dependency>
    <groupId>org.apache.storm</groupId>
    <artifactId>storm-core</artifactId>
    <version>1.2.2</version>
    <scope>compile</scope>
</dependency>

Main class:

TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("TwitchSpout", new TwitchSpout());
builder.setBolt("MessageBolt", new MessageBolt()).shuffleGrouping("TwitchSpout");

Config conf = new Config();
conf.setDebug(false);

new LocalCluster().submitTopology("MyFirstTopo", conf, builder.createTopology());

The UI that I want to start: UI

Upvotes: 1

Views: 337

Answers (1)

Stig Rohde D&#248;ssing
Stig Rohde D&#248;ssing

Reputation: 3651

You are running your topology as a local cluster, which is just intended for testing. You should run it on a real cluster instead (see https://storm.apache.org/releases/2.0.0-SNAPSHOT/Setting-up-a-Storm-cluster.html).

Once you've set it up, you can start Storm UI with the command storm ui using the storm.sh script in storm/bin. There is currently not a way to start Storm UI in a LocalCluster.

Upvotes: 1

Related Questions