You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Dan Blanchard (JIRA)" <ji...@apache.org> on 2018/12/06 14:51:00 UTC

[jira] [Created] (STORM-3299) Thrift ShellComponent should support multiple arguments

Dan Blanchard created STORM-3299:
------------------------------------

             Summary: Thrift ShellComponent should support multiple arguments 
                 Key: STORM-3299
                 URL: https://issues.apache.org/jira/browse/STORM-3299
             Project: Apache Storm
          Issue Type: Improvement
          Components: storm-client, storm-core
            Reporter: Dan Blanchard


As [this comment in storm.thrift from 7 years ago says|[https://github.com/apache/storm/blob/master/storm-client/src/storm.thrift#L69],] `ShellComponent` should support multiple arguments. Currently it supports only `execution_command` and `script`.

 

I am trying to make streamparse support self-contained JARs (where the virtualenv is packaged up inside the JAR so we don't need SSH access to the workers), but I am hitting a wall because of the combination of this issue and STORM-152. I can make an executable that contains the virtualenv using the Python shiv package, but when it gets packaged up in the JAR, it loses its executable bit, so I can't use it as `execution_command`. Therefore, I wanted to make a little shell script that runs first that fixes the executable bit, and then calls the shiv file with the Python module it needs to launch. That would require me to be able to pass the Python module to the wrapper script, but I cannot because I can only specify `bash` as `execution_command` and `my_wrapper_script.sh` as `script`. If I try to make `script` longer (like `my_wrapper_script.sh -arg1 -arg2`), `bash` complains that `my_wrapper_script.sh -arg1 -arg2` doesn't exist, because it's all sent as a single argument.

 

An alternative (but less desirable) fix that I could also work with would be if there were some environment variables set when the commands were launched that told you what component was being launched, and other basic context information. I could probably figure out the module to launch from there.


 

Still another alternative would be to add environment variables to the Thrift `ShellComponent` definition so we could pass arbitrary ones.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)