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
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.
1 Comment
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.