Remote submission of topology to Storm cluster via IDE

Source: Internet
Author: User

Reproduced:

http://weyo.me/pages/techs/storm-topology-remote-submission/

As a late-stage patient with lazy cancer, although Storm requires only one command to submit a task, it has always wanted to have a simpler (TOU) single (LAN) approach, such as submitting a task directly after Windows has written it without having to manually put the jar It would be great to have the package copied to the server and then submit it. Google has finally found a way out of the wall solution: submitting a topology to Remote Storm Cluster

Storm cluster configuration
    • Nimbus: "hd124"
    • nimbus.port:6627
Submit topology
1 2 3 4 5 6 7 8 910111213141516171819
ConfigConf=NewConfig();Conf.Setnumworkers(2);Conf.Setdebug(True);// ...Topology other configuration information, etc.Read the local Storm configuration fileMapStormconf=Utils.Readstormconfig();Stormconf.Put("Nimbus.host","Hd124");Stormconf.Putall(Conf);Nimbus.ClientClient=Nimbusclient.Getconfiguredclient(Stormconf).Getclient();StringInputjar="E:\\workspace\\storm-demo\\target\\storm-demo-0.0.5-snapshot-shade.jar";NimbusclientNimbus=NewNimbusclient(Stormconf,"Hd124",6627);Submitting a jar package using StormsubmitterStringUploadedjarlocation= stormsubmitter. Submitjar (stormconfinputjarstring jsonconf = jsonvalue.tojsonstring (stormconf. ().  ( "remotetopology"  Uploadedjarlocationjsonconfbuilder createtopology ())            
Description
    1. The 8th line reads the local profile of storm and, if not specified, Utils.readStormConfig() reads the default profile of the storm-dependent jar package, for example "\maven\repository\org\apache\storm\storm-core\0.9.3\storm-core-0.9.3.jar\defaults.yaml" , if the cluster configuration differs significantly from the default configuration, the corresponding configuration information needs to be modified.

    2. This code needs to be run after topology has finished packing, because the jar package to be submitted needs to be specified in the program. The Maven plugin can be installed in the IDE, packaged directly after the topology development, and then switched to this commit code to perform the commit task.

    3. After the task submission is complete, you can view the submission results in the Storm UI.

Reference
    1. Http://stackoverflow.com/questions/15781176/how-to-submit-a-topology-in-storm-production-cluster-using-ide
    2. Http://nishutayaltech.blogspot.in/2014/06/submitting-topology-to-remote-storm.html

One more:

http://xumingming.sinaapp.com/117/twitter-storm%E7%9A%84%E4%B8%80%E4%BA%9B%E5%85%B3%E9%94%AE%E6%A6%82%E5%BF%B5/

http://xumingming.sinaapp.com/189/twitter-storm-storm%E7%9A%84%E4%B8%80%E4%BA%9B%E5%B8%B8%E8%A7%81%E6%A8%A1%E5%BC%8F/

Remote submission of topology to Storm cluster via IDE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.