0

I have Apache Storm setup in IntelliJ to run in local mode. I can run the starter topologies just fine. However, I'd like to know how to debug Python bolts. So as a simple example, how would one debug splitsentences.py for the WordCountTopology?

2 Answers 2

2

If you have pydev installed (or you don't mind installing it), you can debug remote applications following this instructions.

pydev is quite ok if you have Java background since it is basically eclipse. Installing it is fairly straightforward following this.

In my machine, the remote debugging works for local processes. I have pydev installed over Eclipse Mars.

(I don't think this would be important, but in my case I have two different installations of Eclipse in my machine, one for Java and one for pydev.)

Hope it helps.

Sign up to request clarification or add additional context in comments.

1 Comment

You're welcome. If you bump into problems, just post them.
1

I can only give a "high level" answer:

Using Storm's multilang feature results in forking off a new process that executes the external code. Thus, a new java.lang.UNIXProcess is started that executes the python command as specified in WordCountTopology:

public SplitSentence() { super("python", "splitsentence.py"); }

You need to do a remote debug session and attach to this process from within Eclipse. However, as I am not familiar with Python I don't know how to remote debug Python in Eclipse.

2 Comments

Thanks for the comment. That's what I figured was going on. You're comment describes what's happening better than I could have done. It doesn't quite answer the question of how to tie the process into a debugger, but hopefully, it will help in determining how to do it.
That was the intention. Hopefully it triggers somebody else... Or you start a new question "How to remote debug Python in Eclipse" ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.