Support Questions

Find answers, ask questions, and share your expertise

How can I create a simple topology? I want to write this program using python on the hortonworks shell.

avatar
Expert Contributor

I'm new to Storm so, please suggest me where to start typing this piece of code and methods to save and execute it on the hortonworks shell. Any suggestions to get started will be helpful. Thanks in advance for your time.

1 ACCEPTED SOLUTION

avatar
Master Mentor
@keerthana gajarajakumar

this is how I started learning Storm. Link. Feel free to try it and report any issues. Michael Noll's blog is an excellent resource on Storm and now Kafka. I built my first Hadoop cluster thanks to his site. He has some beginner posts Here

View solution in original post

24 REPLIES 24

avatar
Master Mentor

@keerthana gajarajakumar before the ExlamationTopology name of topology provide full class name

com.myclass.ClassName

avatar
Master Mentor
@keerthana gajarajakumar

this is how I started learning Storm. Link. Feel free to try it and report any issues. Michael Noll's blog is an excellent resource on Storm and now Kafka. I built my first Hadoop cluster thanks to his site. He has some beginner posts Here

avatar
Master Mentor

@keerthana gajarajakumar also if you are in NYC we are having a meetup with Storm user group on the 17th, welcome!

avatar
Expert Contributor

@Artem Ervits -- Artem.. Once I customize the ExclamationTopology.java file to meet my needs how can I make the shell point to it on my system and execute? Any thoughts?

avatar
Master Mentor

If you use LocalCluster you can execute in IntelliJ or any other IDE. Just make sure in your pom you set scope compile. When you are ready to run on Sandbox, you can scp the jar to sandbox and run the job by specifying storm jar command. Here's more info Link. Just make sure when you compile for submission to real cluster and not LocalCluster, set scope back to provided for Storm dependency. The documentation in the link I gave you is comprehensive. Read through it, it will save you a lot of time. @keerthana gajarajakumar

avatar
Expert Contributor

Totally appreciate your feedback. Just noticed this reply of urs. Thanks!

avatar
Master Mentor

@keerthana gajarajakumar sure thing, let me know how it works out.

avatar
Expert Contributor

Thanks for the suggestion @Artem Ervits -- I wont be in NY during that time, but thanks for letting me know:)

avatar
Expert Contributor

@Artem Ervits -- I created the StormTest.jar file and it's saved in system within C:/.... Now how do I copy this onto the sandbox? I'm having difficulty pointing to this location from the hortonworks shell.

[root@sandbox ~]# cp C:/Users/.IdeaIC15/config/StormTest.jar /usr/hdp

cp: cannot stat `C:/Users/.IdeaIC15/config/StormTest.jar': No such file or directory

How do I fix this issue? I would like to run this jar file from the shell. Your thoughts will be helpful.

avatar
Master Mentor

@keerthana gajarajakumar here's a sample in python. Link if you notice it is in the examples folder of the Storm project.