congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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