Re: problem running flink using remote environment

2016-08-19 Thread Robert Metzger
Hi Baswaraj,

when you are using the ./bin/flink run client for submitting jobs, the
StreamExecutionEnvironment.getExecutionEnvironment(); call is the correct
one to retrieve the Execution Environment.
So you can not use the RemoteEnvironment with the ./bin/flink tool..

The purpose of the remote environment is to be used within regular java
applications, not bootstraped by Flink's command line client.

Let me know if you were using the remove env to solve a specific problem.

Regards,
Robert


On Thu, Aug 18, 2016 at 8:02 AM, Baswaraj Kasture <
baswaraj_kast...@persistent.com> wrote:

> I am using flink 1.1.1.
>
> I am trying to run flink streaming program (kafka as source).
>
> It works perfectly when I use
>
> StreamExecutionEnvironment env = StreamExecutionEnvironment.
> getExecutionEnvironment();
>
>
>
> But, problem is when I use one of the following to create env.
>
>
>
> StreamExecutionEnvironment env = StreamExecutionEnvironment.
> createRemoteEnvironment("103.179.55.121", 6123, new Configuration(),
> "/home/me/my.jar");
>
>
>
> Or
>
>
>
> StreamExecutionEnvironment env = StreamExecutionEnvironment.
> createRemoteEnvironment("103.179.55.121", 6123,  "/home/me/my.jar");
>
>
>
> Here is stack trace of the error:
>
>
>
> Using address 103.179.55.121:6123 to connect to JobManager.
>
> JobManager web interface address http://103.179.55.121:8081
>
> Starting execution of program
>
>
>
> 
>
> The program finished with the following exception:
>
>
>
> The RemoteEnvironment cannot be used when submitting a program through a
> client, or running in a TestEnvironment context.
>
> org.apache.flink.streaming.api.environment.
> RemoteStreamEnvironment.(RemoteStreamEnvironment.java:133)
>
> org.apache.flink.streaming.api.environment.
> RemoteStreamEnvironment.(RemoteStreamEnvironment.java:104)
>
> org.apache.flink.streaming.api.environment.
> StreamExecutionEnvironment.createRemoteEnvironment(
> StreamExecutionEnvironment.java:1659)
>
>
>
> Am I missing anything ? Where How do I get instruction to get this working
> ?
>
> I started flink cluster using:
>
> $ bin/start-cluster.sh
>
>
>
> Command I used to submit the job:
>
>
>
> $ bin/flink run -c com.mine.Kafka  /home/me/my.jar
>
>
>
>
>
> DISCLAIMER == This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>


problem running flink using remote environment

2016-08-17 Thread Baswaraj Kasture
I am using flink 1.1.1.
I am trying to run flink streaming program (kafka as source).
It works perfectly when I use
StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironment();

But, problem is when I use one of the following to create env.

StreamExecutionEnvironment env = 
StreamExecutionEnvironment.createRemoteEnvironment("103.179.55.121", 6123, new 
Configuration(), "/home/me/my.jar");

Or

StreamExecutionEnvironment env = 
StreamExecutionEnvironment.createRemoteEnvironment("103.179.55.121", 6123,  
"/home/me/my.jar");

Here is stack trace of the error:

Using address 103.179.55.121:6123 to connect to JobManager.
JobManager web interface address http://103.179.55.121:8081
Starting execution of program


The program finished with the following exception:

The RemoteEnvironment cannot be used when submitting a program through a 
client, or running in a TestEnvironment context.

org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.(RemoteStreamEnvironment.java:133)

org.apache.flink.streaming.api.environment.RemoteStreamEnvironment.(RemoteStreamEnvironment.java:104)

org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.createRemoteEnvironment(StreamExecutionEnvironment.java:1659)

Am I missing anything ? Where How do I get instruction to get this working ?
I started flink cluster using:
$ bin/start-cluster.sh

Command I used to submit the job:

$ bin/flink run -c com.mine.Kafka  /home/me/my.jar



DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.