congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ILocalCluster.submitTopology
Code IndexAdd Tabnine to your IDE (free)

How to use
submitTopology
method
in
org.apache.storm.ILocalCluster

Best Java code snippets using org.apache.storm.ILocalCluster.submitTopology (Showing top 6 results out of 315)

origin: apache/storm

cluster.submitTopology(topoName, param.getStormConf(), topology);
origin: org.apache.storm/storm-core

} else {
  localNimbus.submitTopology(name, stormConf, topology);
origin: apache/storm

cluster.submitTopology(topoName, new HashMap<>(), stormTopology);
origin: apache/storm

@Test
public void testSubmitTopologyToLocalNimbus() throws Exception {
  int port = Utils.getAvailablePort();
  try (ILocalCluster localCluster = new LocalCluster.Builder()
    .withNimbusDaemon(true)
    .withDaemonConf(Config.NIMBUS_THRIFT_PORT, port)
    .build()) {
    Config topoConf = new Config();
    topoConf.putAll(Utils.readDefaultConfig());
    topoConf.setDebug(true);
    topoConf.put("storm.cluster.mode", "local"); // default is aways "distributed" but here local cluster is being used.
    topoConf.put(Config.STORM_TOPOLOGY_SUBMISSION_NOTIFIER_PLUGIN, InmemoryTopologySubmitterHook.class.getName());
    topoConf.put(Config.NIMBUS_THRIFT_PORT, port);
    List<TopologyDetails> topologyNames = new ArrayList<>();
    for (int i = 0; i < 4; i++) {
      final String topologyName = "word-count-" + UUID.randomUUID().toString();
      final StormTopology stormTopology = createTestTopology();
      topologyNames.add(new TopologyDetails(topologyName, stormTopology));
      localCluster.submitTopology(topologyName, topoConf, stormTopology);
    }
    Assert.assertEquals(InmemoryTopologySubmitterHook.submittedTopologies, topologyNames);
  }
}
origin: apache/storm

topoConf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, TICK_INTERVAL_SECS);
try (ILocalTopology topo = cluster.submitTopology("test", topoConf, builder.createTopology())) {
origin: NationalSecurityAgency/lemongrenade

  @Override
  public void run(ILocalCluster cluster) {
    try {
      for (LGAdapter adapter : startAdapters) {
        cluster.submitTopology(adapter.getAdapterName(), adapter.getConfig(), adapter.getTopology());
      }
      while(true) { //Don't time-out this thread. It kills the launched topologies
        Thread.sleep(300000); // ~18 seconds to boot up on my machine
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
});
org.apache.stormILocalClustersubmitTopology

Javadoc

Submit a topology to be run in local mode

Popular methods of ILocalCluster

  • advanceClusterTime
    Advance the cluster time when the cluster is using SimulatedTime. This is intended for internal test
  • getClusterInfo
  • getClusterState
    This is intended for internal testing only.
  • getTopology
  • getTopologyConf
  • getTrackedId
    If the cluster is tracked get the id for the tracked cluster. This is intended for internal testing
  • killTopologyWithOpts
  • rebalance
  • submitTopologyWithOpts
  • uploadNewCredentials

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now