[
https://issues.apache.org/jira/browse/FLINK-2522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066909#comment-15066909
]
ASF GitHub Bot commented on FLINK-2522:
---------------------------------------
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?
> Integrate Streaming Api into Flink-scala-shell
> ----------------------------------------------
>
> Key: FLINK-2522
> URL: https://issues.apache.org/jira/browse/FLINK-2522
> Project: Flink
> Issue Type: Improvement
> Components: Scala Shell
> Reporter: Nikolaas Steenbergen
> Assignee: Nikolaas Steenbergen
>
> startup scala shell with "-s" or "-streaming" flag to use the streaming api
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)