Github user HeartSaVioR commented on a diff in the pull request:

    https://github.com/apache/storm/pull/575#discussion_r33895557
  
    --- Diff: storm-core/src/jvm/backtype/storm/utils/ShellProcess.java ---
    @@ -48,8 +50,31 @@ public ShellProcess(String[] command) {
             this.command = command;
         }
     
    +    public void setEnv(Map<String, String> env) {
    +        this.env = env;
    +    }
    +
    +    private void modifyEnvironment(Map<String, String> buildEnv) {
    +        for (Map.Entry<String, String> entry : env.entrySet()) {
    +            if ("PATH".equals(entry.getKey())) {
    +                buildEnv.put("PATH", buildEnv.get("PATH") + 
File.pathSeparatorChar + env.get("PATH"));
    +            } else {
    +                buildEnv.put(entry.getKey(), entry.getValue());
    +            }
    +        }
    +    }
    +
    +
         public Number launch(Map conf, TopologyContext context) {
             ProcessBuilder builder = new ProcessBuilder(command);
    +        if (!env.isEmpty()) {
    +            Map<String, String> buildEnv = builder.environment();
    +            modifyEnvironment(buildEnv);
    +        }
    +        for(Map.Entry<String, String> entry : 
builder.environment().entrySet()) {
    --- End diff --
    
    @bourneagain
    Github points out different line, I mean 74 line and belows, why call 
System.out.println() for each entry, prefix with "SHYAM:"?


---
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.
---

Reply via email to