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

[Question]fabfile.py not working? #376

Closed LImoritakeU closed 7 years ago

LImoritakeU commented 7 years ago

Hi! I would like to copy a file to my supervisor nodes before submit the topology. so I tried to use fabfile.py. as below.

from fabric.api import run, put
from streamparse.ext.fabric import *

path = '/home/vagrant'

def pre_submit(topology_name, env_name, env_config):
    if env_name == 'vagrant':
        run('mkdir -p %s' % path)
        put('GeoIP.dat', path )

But when I submit this topology by sparse submit -e vagrant, fabric didn't work. streamparse version is 3.4.0


BTW, in http://streamparse.readthedocs.io/en/stable/faq.html#how-do-i-trigger-some-code-before-or-after-i-submit-my-topology

It told the fabric filename is fabric.py, and another page http://streamparse.readthedocs.io/en/stable/quickstart.html#project-structure said fabric filename is fabfile.py , which one is correct?