pystorm / streamparse

Run Python in Apache Storm topologies. Pythonic API, CLI tooling, and a topology DSL.
http://streamparse.readthedocs.io/
Apache License 2.0
1.5k stars 218 forks source link

Relative path reference in a spout or bolt #410

Open steveyang90 opened 6 years ago

steveyang90 commented 6 years ago

Hello there! Is there a way to refer to a relative file path from within a spout or bolt? I usually use something like os.path.dirname(os.path.realpath(__file__)) to do so, however, it looks like the the spout/bolt scripts get copied to a temporary location before being executed in the streamparse architecture, so the relative path that is pulled in is that tmp location, rather than where the spout itself is saved. I'm using version 2.1.4 if this makes a difference. Thanks!