Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The ScriptRunner class used in Samza REST uses ProcessBuilder to execute scripts for job start/stop/status as well as various other operations.
ProcessBuilder, by default, forwards all environment variables from the parent process to the spawned process and this can cause unexpected behaviors.
For example, if samza rest configures one type of log4j configuration, the script invoked on that job will use the same configuration, even if the job expects a different configuration.
The minimum requirement for this ticket is to clear the environment variables using
`processBuilder.environment().clear()`
Even better, we could provide some mechanism in the ScriptRunner to set specific environment variables.