To run a ShellBolt on a cluster, the scripts that are shelled out to must be in the resources directory within the jar submitted to the master. During development/testing on a local machine, that resources directory just needs to be on the classpath.
When creating topologies using the Java API, subclass this bolt and implement the IRichBolt interface to create components for the topology that use other languages. For example:
public class MyBolt extends ShellBolt implements IRichBolt { public MyBolt() { super("python", "mybolt.py"); } public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("field1", "field2")); } }
|
|
|
|