GitHub user bourneagain opened a pull request:
https://github.com/apache/storm/pull/575
STORM-160 Allow ShellBolt to set env vars (particularly PATH)
Support to allow ShellBolt to set environment variables
Example :
WordCountTopology.javaâ¨builder.setBolt("split", (IRichBolt) new
SplitSentence().setEnv(envMap) , 8).shuffleGrouping("spout");
where envMap is a map of environment variables to be exported.
Map<String, String> envMap = new HashMap<>();â¨
envMap.put("PATH","/usr/local"); // append to PATH variableâ¨
envMap.put("HOME", "/usr/local"); // override HOME variable
NOTE: PATH variable is appended by default while others are overridden.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bourneagain/storm STORM-160
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/storm/pull/575.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #575
----
commit 80850ca65c257e7ca68dba4363ef745268c80a1b
Author: Shyam Rajendran <[email protected]>
Date: 2015-06-03T22:21:32Z
STORM-160 Allow ShellBolt to set env vars (particularly PATH)
Support to allow ShellBolt to set environment variables
Example :
WordCountTopology.javaâ¨builder.setBolt("split", (IRichBolt) new
SplitSentence().setEnv(envMap) , 8).shuffleGrouping("spout");
where envMap is a map of environment variables to be exported.
Map<String, String> envMap = new HashMap<>();â¨
envMap.put("PATH","/usr/local"); // append to PATH variableâ¨
envMap.put("HOME", "/usr/local"); // override HOME variable
NOTE: PATH variable is appended by default while others are overridden.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---