Github user mxm commented on the pull request:
https://github.com/apache/flink/pull/1412#issuecomment-172493786
The context environment is set in the `ScalaShellRemoteEnvironment` to
disable creation of new environments by the user. This is done when you first
create the batch environment. Then you create the
`ScalaShellRemoteStreamEnvironment` which internally creates the
`StreamRemoteEnvironment` which fails because the context environment is
already set.
You may work around this by setting the context environment (and thereby
disabling creation of other environments) **after** you have created both of
your shell environments.
---
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.
---