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
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.
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.
After the task submission is complete, you can view the submission results in the Storm UI.
Reference
- Http://stackoverflow.com/questions/15781176/how-to-submit-a-topology-in-storm-production-cluster-using-ide
- 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