Github user nikste commented on the pull request:

    https://github.com/apache/flink/pull/1412#issuecomment-166394233
  
    Hey @mxm,
    So I've tried to initialize the scala shell with one and two different 
miniclusters and initialize the streaming and batch environment simultaneously. 
However, for the streaming environment it throws following exception:
    
    ```java
    Exception in thread "main" 
org.apache.flink.api.common.InvalidProgramException: The RemoteEnvironment 
cannot be used when submitting a program through a client, or running in a 
TestEnvironment context.
        at 
org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.<init>(RemoteStreamEnvironment.java:130)
        at 
org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.<init>(RemoteStreamEnvironment.java:101)
        at 
org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.<init>(RemoteStreamEnvironment.java:78)
        at 
org.apache.flink.api.java.ScalaShellRemoteStreamEnvironment.<init>(ScalaShellRemoteStreamEnvironment.java:58)
        at org.apache.flink.api.scala.FlinkILoop.<init>(FlinkILoop.scala:104)
        at org.apache.flink.api.scala.FlinkILoop.<init>(FlinkILoop.scala:61)
        at 
org.apache.flink.api.scala.FlinkShell$.startShell(FlinkShell.scala:163)
        at org.apache.flink.api.scala.FlinkShell$.main(FlinkShell.scala:87)
        at org.apache.flink.api.scala.FlinkShell.main(FlinkShell.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
    ```
    Any Idea how to get around this?
      


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