[
https://issues.apache.org/jira/browse/STORM-3554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
AK47Sonic updated STORM-3554:
-----------------------------
Description:
Hi team,
[Storm version: 2.1.0]
According to the doc [https://storm.apache.org/releases/2.1.0/Local-mode.html],
after I shutdown LocalCluster by calling shutdown or close method, JVM still
run and can't exit on IDEA. I think it is a simple demo blow. Is it a bug?
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;
public class WordCountTopology {
public static void main(String[] args) throws Exception
{
TopologyBuilder builder = new TopologyBuilder();
// builder.setSpout("spout", new RandomSentenceSpout(), 5);
// builder.setBolt("split", new SplitSentenceBolt(),
8).shuffleGrouping("spout");
// builder.setBolt("count", new WordCountBolt(), 2).fieldsGrouping("split", new
Fields("word"));
Config conf = new Config();
conf.setDebug(true);
String topologyName = "word-count";
conf.setNumWorkers(2);
LocalCluster cluster = null;
cluster = new LocalCluster();
cluster.submitTopology(topologyName, conf, builder.createTopology());
Thread.sleep(10000);
// cluster.close();
cluster.shutdown();
}
}
was:
Hi team,
[Storm version: 2.1.0] After I shutdown LocalCluster by calling shutdown or
close method, JVM still run and can't exit on IDEA. I think it is a simple demo
blow. Is it a bug?
import org.apache.storm.Config;
import org.apache.storm.LocalCluster;
import org.apache.storm.topology.TopologyBuilder;
public class WordCountTopology {
public static void main(String[] args) throws Exception {
TopologyBuilder builder = new TopologyBuilder();
// builder.setSpout("spout", new RandomSentenceSpout(), 5);
// builder.setBolt("split", new SplitSentenceBolt(),
8).shuffleGrouping("spout");
// builder.setBolt("count", new WordCountBolt(), 2).fieldsGrouping("split", new
Fields("word"));
Config conf = new Config();
conf.setDebug(true);
String topologyName = "word-count";
conf.setNumWorkers(2);
LocalCluster cluster = null;
cluster = new LocalCluster();
cluster.submitTopology(topologyName, conf, builder.createTopology());
Thread.sleep(10000);
// cluster.close();
cluster.shutdown();
}
}
> LocalCluster can't be shutdown and JVM still run
> ------------------------------------------------
>
> Key: STORM-3554
> URL: https://issues.apache.org/jira/browse/STORM-3554
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-client, storm-server
> Affects Versions: 2.1.0
> Environment: Storm 2.1.0
> IntelliJ IDEA
> Reporter: AK47Sonic
> Priority: Major
>
> Hi team,
> [Storm version: 2.1.0]
> According to the doc
> [https://storm.apache.org/releases/2.1.0/Local-mode.html], after I shutdown
> LocalCluster by calling shutdown or close method, JVM still run and can't
> exit on IDEA. I think it is a simple demo blow. Is it a bug?
>
> import org.apache.storm.Config;
> import org.apache.storm.LocalCluster;
> import org.apache.storm.topology.TopologyBuilder;
> public class WordCountTopology {
> public static void main(String[] args) throws Exception
> {
> TopologyBuilder builder = new TopologyBuilder();
> // builder.setSpout("spout", new RandomSentenceSpout(), 5);
> // builder.setBolt("split", new SplitSentenceBolt(),
> 8).shuffleGrouping("spout");
> // builder.setBolt("count", new WordCountBolt(), 2).fieldsGrouping("split",
> new Fields("word"));
> Config conf = new Config();
> conf.setDebug(true);
> String topologyName = "word-count";
> conf.setNumWorkers(2);
> LocalCluster cluster = null;
> cluster = new LocalCluster();
> cluster.submitTopology(topologyName, conf, builder.createTopology());
> Thread.sleep(10000);
> // cluster.close();
> cluster.shutdown();
> }
> }
--
This message was sent by Atlassian Jira
(v8.3.4#803005)