Official flink java client

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Official flink java client

gaurav kulkarni
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Official flink java client

Yun Gao
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Official flink java client

Flavio Pompermaier
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Re: Official flink java client

Yun Gao
Hi Falvio,

Very thanks for the explanation, may be another option is to have a look at 
the http rest API[1] ? Flink provides official http api to submit jar jobs and query 
job status, and they might be able to help.

Best,
Yun

------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 15:25:55 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Official flink java client
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Re: Official flink java client

Flavio Pompermaier
Obviously I could rewrite a java client from scratch that interface with the provided REST API but why if I can reuse something already existing?
Usually I interface with REST API using auto generated clients (if APIs are exposed via Swagger or OpenApi).
If that's not an option, writing a REST client from scratch is something I try to avoid as much as I can..

Best,
Flavio

On Fri, Apr 23, 2021 at 9:55 AM Yun Gao <[hidden email]> wrote:
Hi Falvio,

Very thanks for the explanation, may be another option is to have a look at 
the http rest API[1] ? Flink provides official http api to submit jar jobs and query 
job status, and they might be able to help.

Best,
Yun

------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 15:25:55 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Official flink java client
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Official flink java client

Yun Gao
Hi Flavio,

Got that, from my view I think RestClusterClient might not be viewed as public API, 
and might be change between version, thus it might need to be careful when upgrading.

Best,
Yun


------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 16:10:05 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Re: Official flink java client
Obviously I could rewrite a java client from scratch that interface with the provided REST API but why if I can reuse something already existing?
Usually I interface with REST API using auto generated clients (if APIs are exposed via Swagger or OpenApi).
If that's not an option, writing a REST client from scratch is something I try to avoid as much as I can..

Best,
Flavio

On Fri, Apr 23, 2021 at 9:55 AM Yun Gao <[hidden email]> wrote:
Hi Falvio,

Very thanks for the explanation, may be another option is to have a look at 
the http rest API[1] ? Flink provides official http api to submit jar jobs and query 
job status, and they might be able to help.

Best,
Yun

------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 15:25:55 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Official flink java client
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav



Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Official flink java client

Flavio Pompermaier
Yes, that's a known risk. Indeed it would be awesome if the REST API would be published also using some format that allow automatic client generation (like swagger or openapi). Also release an official client could be an option otherwise...I think that it's very annoying to write a client from scratch.
I'll continue to use RestClusterClient until it works..

On Fri, Apr 23, 2021 at 2:48 PM Yun Gao <[hidden email]> wrote:
Hi Flavio,

Got that, from my view I think RestClusterClient might not be viewed as public API, 
and might be change between version, thus it might need to be careful when upgrading.

Best,
Yun


------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 16:10:05 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Re: Official flink java client
Obviously I could rewrite a java client from scratch that interface with the provided REST API but why if I can reuse something already existing?
Usually I interface with REST API using auto generated clients (if APIs are exposed via Swagger or OpenApi).
If that's not an option, writing a REST client from scratch is something I try to avoid as much as I can..

Best,
Flavio

On Fri, Apr 23, 2021 at 9:55 AM Yun Gao <[hidden email]> wrote:
Hi Falvio,

Very thanks for the explanation, may be another option is to have a look at 
the http rest API[1] ? Flink provides official http api to submit jar jobs and query 
job status, and they might be able to help.

Best,
Yun

------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 15:25:55 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Official flink java client
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav




Reply | Threaded
Open this post in threaded view
|

Re: Official flink java client

gaurav kulkarni
Thanks for the response, folks! I plan to use the client mostly for monitoring status of jobs, probably to trigger savepoints too. I may extend it in future to submit jobs. Given RestClusterClient is not officially supported, I will probably build something myself. Agree with Flavio, it would be great if there is an official client available or if the client can be generated automatically. 

Thanks,
Gaurav

On Friday, April 23, 2021, 06:18:35 AM PDT, Flavio Pompermaier <[hidden email]> wrote:


Yes, that's a known risk. Indeed it would be awesome if the REST API would be published also using some format that allow automatic client generation (like swagger or openapi). Also release an official client could be an option otherwise...I think that it's very annoying to write a client from scratch.
I'll continue to use RestClusterClient until it works..

On Fri, Apr 23, 2021 at 2:48 PM Yun Gao <[hidden email]> wrote:
Hi Flavio,

Got that, from my view I think RestClusterClient might not be viewed as public API, 
and might be change between version, thus it might need to be careful when upgrading.

Best,
Yun


------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 16:10:05 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Re: Official flink java client
Obviously I could rewrite a java client from scratch that interface with the provided REST API but why if I can reuse something already existing?
Usually I interface with REST API using auto generated clients (if APIs are exposed via Swagger or OpenApi).
If that's not an option, writing a REST client from scratch is something I try to avoid as much as I can..

Best,
Flavio

On Fri, Apr 23, 2021 at 9:55 AM Yun Gao <[hidden email]> wrote:
Hi Falvio,

Very thanks for the explanation, may be another option is to have a look at 
the http rest API[1] ? Flink provides official http api to submit jar jobs and query 
job status, and they might be able to help.

Best,
Yun

------------------Original Mail ------------------
Sender:Flavio Pompermaier <[hidden email]>
Send Date:Fri Apr 23 15:25:55 2021
Recipients:Yun Gao <[hidden email]>
CC:gaurav kulkarni <[hidden email]>, User <[hidden email]>
Subject:Re: Official flink java client
I also interface to Flink clusters using REST in order to avoid many annoying problems (due to dependency conflicts, classpath or env variables).
I use an extended version of the RestClusterClient that you can reuse if you want to.
It is available at [1] and it add some missing methods to the default Flink version (I also had to copy that class and modify the visibility of some field in order to enable the extension).
Officially the Flink RestClusterClient is meant to be used for internal use only but it actually work very well. 

Best,
Flavio


On Fri, Apr 23, 2021 at 5:10 AM Yun Gao <[hidden email]> wrote:
Hi gaurav,

Logicall Flink client is bear inside the StreamExecutionEnvironment, and users could use the 
StreamExecutionEnvironment to execute their jobs. Could you share more about why you 
want to directly use the client? 

Best,
Yun


------------------Original Mail ------------------
Sender:gaurav kulkarni <[hidden email]>
Send Date:Fri Apr 23 10:14:08 2021
Recipients:User <[hidden email]>
Subject:Official flink java client
Hi, 

Is there any official flink client in java that's available? I came across RestClusterClient, but I am not sure if its official. I can create my own client, but just wanted to check if there is anything official available already that I can leverage. 

Thanks,
Gaurav