Package backtype.storm

Examples of backtype.storm.LocalCluster.shutdown()


      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("word-count", conf, builder.createTopology());

      Thread.sleep(20000);

      cluster.shutdown();
    }
  }
}
View Full Code Here


      LocalCluster cluster = new LocalCluster();
      cluster.submitTopology("storm-jms-example", conf, builder.createTopology());
      Utils.sleep(60000);
      cluster.killTopology("storm-jms-example");
      cluster.shutdown();
    }
  }

}
View Full Code Here

            String[] urlsToTry = new String[] { "foo.com/blog/1", "engineering.twitter.com/blog/5", "notaurl.com"};
            for(String url: urlsToTry) {
                System.out.println("Reach of " + url + ": " + drpc.execute(TOPOLOGY_NAME, url));
            }
           
            cluster.shutdown();
            drpc.shutdown();
        }
    }
}
View Full Code Here

    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology(topologyName, conf, builder.createTopology());

    Thread.sleep(600000);

    cluster.shutdown();
  }

  public static void SetRemoteTopology() throws AlreadyAliveException,
      InvalidTopologyException, TopologyAssignException {
View Full Code Here

    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("SplitMerge", conf, builder.createTopology());

    Thread.sleep(60000);

    cluster.shutdown();
  }

  public static void SetRemoteTopology() throws AlreadyAliveException,
      InvalidTopologyException, TopologyAssignException {
View Full Code Here

    StormTopology topology = buildTopology();
    LocalCluster cluster = new LocalCluster();
    cluster.submitTopology("SplitMerge", conf, topology);
    Thread.sleep(60000);
    cluster.shutdown();
  }

  @Override
  public int run(String[] args) throws Exception {
    Config conf = getConf();
View Full Code Here

            String.valueOf(conf.get("topology.name")), conf,
            builder.createTopology());

        Thread.sleep(200000);

        cluster.shutdown();
      } else {
        StormSubmitter.submitTopology(
            String.valueOf(conf.get("topology.name")), conf,
            builder.createTopology());
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.