Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3554

LocalCluster can't be shutdown and JVM still run

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: storm-client, storm-server
    • Labels:
      None
    • Environment:
      Storm 2.1.0
      JDK 1.8
      IntelliJ IDEA

      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. I also try storm 1.2.3 and JVM can exit. Is it a bug for storm 2 ?

       

      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(); }

      }

      POM.xml:

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <storm.version>2.1.0</storm.version>
      </properties>

      <dependencies>
      <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-client</artifactId>
      <version>${storm.version}</version>
      </dependency>

      <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-server</artifactId>
      <version>${storm.version}</version>
      </dependency>
      </dependencies>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              AK47Sonic AK47Sonic
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: