Re: Flink reactive mode for application clusters on AWS EMR - Auto Scaling

2023-01-13 Thread Gyula Fóra
Hi Madan,

With reactive mode you need to build a completely custom auto scaling
logic, it can work but it takes considerable effort.

Instead I recommend using the Flink Kubernetes Operator which now contains
the first version of an actual autoscaler module that collects metrics and
scales Flink jobs .

https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/custom-resource/autoscaler/

The operator autoscaler uses Kubernetes native integration and works more
or less out of the box.

Cheers
Gyula

On Sat, 14 Jan 2023 at 01:16, Madan D via user 
wrote:

> Hello Team,
> I would like to understand auto scaling on EMR using either reactive mode
> or adaptive scheduler with custom or managed scaling.
> Can some one help me on this.
>
>
> Regards,
> Madan
>
>
>
>


Flink reactive mode for application clusters on AWS EMR - Auto Scaling

2023-01-13 Thread Madan D via user
Hello Team,I would like to understand auto scaling on EMR using either reactive 
mode or adaptive scheduler with custom or managed scaling.Can some one help me 
on this.

Regards,Madan 




Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS EKS

2023-01-13 Thread Gyula Fóra
I would be happy to answer more questions later but it would be best if you
could first try the operator or at least read the documentation:
https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/

You will find answers to most of your questions, and running it locally on
minikube to try some test scenarios will be even more beneficial.

Thanks
Gyula

On Fri, Jan 13, 2023 at 5:50 PM Tamir Sagi 
wrote:

> Hey Gyula,
> Thank you for fast response.
>
> I understand it completely. I believe the operator has similar
> functionalities to the custom service we have developed regarding deploy,
> update and delete clusters.
> The different from our perspective is that we have added several more
> capabilities and configurations for the deployment phase.
>
> Assuming there is an application cluster(Native k8s) with 3 Job managers
> and 2 Task managers. The cluster is running for several hours. let's say In
> a given point in time, the operator decides to scale the cluster up (based
> on pre-defined configurations).
>
> you wrote
>
> *The operator also now contains an autoscaler module that runs within the
> operator and monitors Flink clusters and determines whether a jobvertex
> should be scaled up or down. It will then scale the job accordingly.*
>
> it sounds great,  Does that mean that it simply creates a new TM pod
> which then becomes part of the cluster? (I'm asking because the graph is
> created while deploying the cluster at first place).
> If yes, is this module can be used outside that operator?
>
> If not, would you please elaborate whether this scale(up/down) operation
> leads to downtime?
>
> Best,
> Tamir.
>
>
>
>
>
>
>
>
> --
> *From:* Gyula Fóra 
> *Sent:* Friday, January 13, 2023 4:42 PM
> *To:* Tamir Sagi 
> *Cc:* Chesnay Schepler ; user@flink.apache.org <
> user@flink.apache.org>
> *Subject:* Re: [EXTERNAL] Re: Flink reactive mode for application
> clusters on AWS EKS
>
>
> *EXTERNAL EMAIL*
>
>
> Hi Tamir!
>
> Let me try to clarify a few points here.
>
> The operator works based on FlinkDeployment Custom Resources (Yaml
> definition) and the operator creates the required clusters / taskmanagers
> based on that. If you change the parallelism of your FlinkDeployment Yaml,
> the operator will adjust the cluster size (scale up or down).
>
> The operator also now contains an autoscaler module that runs within the
> operator and monitors Flink clusters and determines whether a jobvertex
> should be scaled up or down. It will then scale the job accordingly.
> The autoscaler currently only works with the default Native Deployment
> mode.
>
> The operator does not use Flink reactive mode to perform autoscaling.
>
> I highly recommend trying to migrate to the operator (or at least testing
> it locally so you fully understand the functionality), you will save
> yourself a tremendous amount of work especially if you are looking to build
> an autoscaler.
>
> Cheers,
> Gyula
>
> On Fri, Jan 13, 2023 at 3:37 PM Tamir Sagi 
> wrote:
>
> Hey Gyula,
>
> Thanks for clarifying that.
>
> We created a custom service before an official Flink k8s operator was
> released. That service deploys/upgrades/deletes clusters (no Yamls are
> needed). It handles failures including retries and cleanups based on our
> needs. Hence, moving to the official Flink operator might take a while.
>
> Does the operator also perform scale down?
>
> Regarding HPA, Task managers are created by Flink based on parallelism &
> number of slots. Then the cluster has fixed size of X JMs and Y TMs.
> I was thinking about adding HPA but wondered whether or not Flink will
> handle the new TMs properly (I have not tested it).
>
> We are probably left with the option to implement the auto scaling
> mechanism ourselves on top of Flink clusters.
>
> Best,
> Tamir.
> --
> *From:* Gyula Fóra 
> *Sent:* Friday, January 13, 2023 8:39 AM
> *To:* Swathi Chandrashekar 
> *Cc:* Chesnay Schepler ; Tamir Sagi <
> tamir.s...@niceactimize.com>; user@flink.apache.org  >
> *Subject:* Re: [EXTERNAL] Re: Flink reactive mode for application
> clusters on AWS EKS
>
>
> *EXTERNAL EMAIL*
>
>
> What I am trying to say is use the Kubernetes operator with Native
> (default) mode and forget about reactive .
>
> The operator does everything you wwant plus has an actual autoscaler.
>
> Gyula
>
> On Fri, 13 Jan 2023 at 07:24, Swathi Chandrashekar 
> wrote:
>
> Got it, so this means, we should have standalone app mode cluster which is
> managed by a flink Kubernetes operator and the operator would update the
> replicas based on the metrics ( autoscale ) which in-tern changes the
> parallelism as reactivemode is enabled.
>
>
>
> Regards,
>
> Swathi C
>
>
>
> *From:* Gyula Fóra 
> *Sent:* Friday, January 13, 2023 11:31 AM
> *To:* Swathi Chandrashekar 
> *Cc:* Chesnay Schepler ; Tamir Sagi <
> tamir.s...@niceactimize.com>; user@flink.apache.org
> *Subject:* Re: [EXTERNAL] Re: Flink reactive mode for application
> 

Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS EKS

2023-01-13 Thread Tamir Sagi
Hey Gyula,
Thank you for fast response.

I understand it completely. I believe the operator has similar functionalities 
to the custom service we have developed regarding deploy, update and delete 
clusters.
The different from our perspective is that we have added several more 
capabilities and configurations for the deployment phase.

Assuming there is an application cluster(Native k8s) with 3 Job managers and 2 
Task managers. The cluster is running for several hours. let's say In a given 
point in time, the operator decides to scale the cluster up (based on 
pre-defined configurations).

you wrote
The operator also now contains an autoscaler module that runs within the 
operator and monitors Flink clusters and determines whether a jobvertex should 
be scaled up or down. It will then scale the job accordingly.
it sounds great,  Does that mean that it simply creates a new TM pod which then 
becomes part of the cluster? (I'm asking because the graph is created while 
deploying the cluster at first place).
If yes, is this module can be used outside that operator?

If not, would you please elaborate whether this scale(up/down) operation leads 
to downtime?

Best,
Tamir.









From: Gyula Fóra 
Sent: Friday, January 13, 2023 4:42 PM
To: Tamir Sagi 
Cc: Chesnay Schepler ; user@flink.apache.org 

Subject: Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS 
EKS


EXTERNAL EMAIL


Hi Tamir!

Let me try to clarify a few points here.

The operator works based on FlinkDeployment Custom Resources (Yaml definition) 
and the operator creates the required clusters / taskmanagers based on that. If 
you change the parallelism of your FlinkDeployment Yaml, the operator will 
adjust the cluster size (scale up or down).

The operator also now contains an autoscaler module that runs within the 
operator and monitors Flink clusters and determines whether a jobvertex should 
be scaled up or down. It will then scale the job accordingly.
The autoscaler currently only works with the default Native Deployment mode.

The operator does not use Flink reactive mode to perform autoscaling.

I highly recommend trying to migrate to the operator (or at least testing it 
locally so you fully understand the functionality), you will save yourself a 
tremendous amount of work especially if you are looking to build an autoscaler.

Cheers,
Gyula

On Fri, Jan 13, 2023 at 3:37 PM Tamir Sagi 
mailto:tamir.s...@niceactimize.com>> wrote:
Hey Gyula,

Thanks for clarifying that.

We created a custom service before an official Flink k8s operator was released. 
That service deploys/upgrades/deletes clusters (no Yamls are needed). It 
handles failures including retries and cleanups based on our needs. Hence, 
moving to the official Flink operator might take a while.

Does the operator also perform scale down?

Regarding HPA, Task managers are created by Flink based on parallelism & number 
of slots. Then the cluster has fixed size of X JMs and Y TMs.
I was thinking about adding HPA but wondered whether or not Flink will handle 
the new TMs properly (I have not tested it).

We are probably left with the option to implement the auto scaling mechanism 
ourselves on top of Flink clusters.

Best,
Tamir.

From: Gyula Fóra mailto:gyula.f...@gmail.com>>
Sent: Friday, January 13, 2023 8:39 AM
To: Swathi Chandrashekar mailto:cswa...@microsoft.com>>
Cc: Chesnay Schepler mailto:ches...@apache.org>>; Tamir 
Sagi mailto:tamir.s...@niceactimize.com>>; 
user@flink.apache.org 
mailto:user@flink.apache.org>>
Subject: Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS 
EKS


EXTERNAL EMAIL


What I am trying to say is use the Kubernetes operator with Native (default) 
mode and forget about reactive .

The operator does everything you wwant plus has an actual autoscaler.

Gyula

On Fri, 13 Jan 2023 at 07:24, Swathi Chandrashekar 
mailto:cswa...@microsoft.com>> wrote:

Got it, so this means, we should have standalone app mode cluster which is 
managed by a flink Kubernetes operator and the operator would update the 
replicas based on the metrics ( autoscale ) which in-tern changes the 
parallelism as reactivemode is enabled.



Regards,

Swathi C



From: Gyula Fóra mailto:gyula.f...@gmail.com>>
Sent: Friday, January 13, 2023 11:31 AM
To: Swathi Chandrashekar mailto:cswa...@microsoft.com>>
Cc: Chesnay Schepler mailto:ches...@apache.org>>; Tamir 
Sagi mailto:tamir.s...@niceactimize.com>>; 
user@flink.apache.org
Subject: Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS 
EKS



No but the Kubernetes operator itself already provides similar feature set.



Not sure why you want the reactive mode in the first place . If it's because 
you want to implement auto scaling on top of it, then I think the operator is a 
better alternative.



I think you should try to understand what exactly the 

[ANNOUNCE] Apache Flink Table Store 0.3.0 released

2023-01-13 Thread Jingsong Li
The Apache Flink community is very happy to announce the release of
Apache Flink Table Store 0.3.0.

Apache Flink Table Store is a unified storage to build dynamic tables
for both streaming and batch processing in Flink, supporting
high-speed data ingestion and timely data query.

Please check out the release blog post for an overview of the release:
https://flink.apache.org/news/2023/01/13/release-table-store-0.3.0.html

The release is available for download at:
https://flink.apache.org/downloads.html

Maven artifacts for Flink Table Store can be found at:
https://central.sonatype.dev/search?q=flink-table-store

The full release notes are available in Jira:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315522=12352111

We would like to thank all contributors of the Apache Flink community
who made this release possible!

Best,
Jingsong Lee


[ANNOUNCE] Apache Flink Table Store 0.3.0 released

2023-01-13 Thread Jingsong Li
The Apache Flink community is very happy to announce the release of
Apache Flink Table Store 0.3.0.

Apache Flink Table Store is a unified storage to build dynamic tables
for both streaming and batch processing in Flink, supporting
high-speed data ingestion and timely data query.

Please check out the release blog post for an overview of the release:
https://flink.apache.org/news/2023/01/13/release-table-store-0.3.0.html

The release is available for download at:
https://flink.apache.org/downloads.html

Maven artifacts for Flink Table Store can be found at:
https://central.sonatype.dev/search?q=flink-table-store

The full release notes are available in Jira:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315522=12352111

We would like to thank all contributors of the Apache Flink community
who made this release possible!

Best,
Jingsong Lee


Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS EKS

2023-01-13 Thread Gyula Fóra
Hi Tamir!

Let me try to clarify a few points here.

The operator works based on FlinkDeployment Custom Resources (Yaml
definition) and the operator creates the required clusters / taskmanagers
based on that. If you change the parallelism of your FlinkDeployment Yaml,
the operator will adjust the cluster size (scale up or down).

The operator also now contains an autoscaler module that runs within the
operator and monitors Flink clusters and determines whether a jobvertex
should be scaled up or down. It will then scale the job accordingly.
The autoscaler currently only works with the default Native Deployment mode.

The operator does not use Flink reactive mode to perform autoscaling.

I highly recommend trying to migrate to the operator (or at least testing
it locally so you fully understand the functionality), you will save
yourself a tremendous amount of work especially if you are looking to build
an autoscaler.

Cheers,
Gyula

On Fri, Jan 13, 2023 at 3:37 PM Tamir Sagi 
wrote:

> Hey Gyula,
>
> Thanks for clarifying that.
>
> We created a custom service before an official Flink k8s operator was
> released. That service deploys/upgrades/deletes clusters (no Yamls are
> needed). It handles failures including retries and cleanups based on our
> needs. Hence, moving to the official Flink operator might take a while.
>
> Does the operator also perform scale down?
>
> Regarding HPA, Task managers are created by Flink based on parallelism &
> number of slots. Then the cluster has fixed size of X JMs and Y TMs.
> I was thinking about adding HPA but wondered whether or not Flink will
> handle the new TMs properly (I have not tested it).
>
> We are probably left with the option to implement the auto scaling
> mechanism ourselves on top of Flink clusters.
>
> Best,
> Tamir.
> --
> *From:* Gyula Fóra 
> *Sent:* Friday, January 13, 2023 8:39 AM
> *To:* Swathi Chandrashekar 
> *Cc:* Chesnay Schepler ; Tamir Sagi <
> tamir.s...@niceactimize.com>; user@flink.apache.org  >
> *Subject:* Re: [EXTERNAL] Re: Flink reactive mode for application
> clusters on AWS EKS
>
>
> *EXTERNAL EMAIL*
>
>
> What I am trying to say is use the Kubernetes operator with Native
> (default) mode and forget about reactive .
>
> The operator does everything you wwant plus has an actual autoscaler.
>
> Gyula
>
> On Fri, 13 Jan 2023 at 07:24, Swathi Chandrashekar 
> wrote:
>
> Got it, so this means, we should have standalone app mode cluster which is
> managed by a flink Kubernetes operator and the operator would update the
> replicas based on the metrics ( autoscale ) which in-tern changes the
> parallelism as reactivemode is enabled.
>
>
>
> Regards,
>
> Swathi C
>
>
>
> *From:* Gyula Fóra 
> *Sent:* Friday, January 13, 2023 11:31 AM
> *To:* Swathi Chandrashekar 
> *Cc:* Chesnay Schepler ; Tamir Sagi <
> tamir.s...@niceactimize.com>; user@flink.apache.org
> *Subject:* Re: [EXTERNAL] Re: Flink reactive mode for application
> clusters on AWS EKS
>
>
>
> No but the Kubernetes operator itself already provides similar feature set.
>
>
>
> Not sure why you want the reactive mode in the first place . If it's
> because you want to implement auto scaling on top of it, then I think the
> operator is a better alternative.
>
>
>
> I think you should try to understand what exactly the reactive mode
> provides vs what the operator does. Reactive mode alone doesn’t do too much.
>
>
>
> Gyula
>
>
>
> On Fri, 13 Jan 2023 at 06:33, Swathi Chandrashekar 
> wrote:
>
> Hi @Gyula Fóra ,
>
>
>
> Does this mean, with Kubernetes operator, we can have reactive mode in
> native flink which is in app mode ? [ Not just standalone app mode ]
>
>
>
> Regards,
>
> Swathi C
>
>
>
> *From:* Gyula Fóra 
> *Sent:* Thursday, January 12, 2023 11:14 PM
> *To:* Tamir Sagi 
> *Cc:* Chesnay Schepler ; user@flink.apache.org
> *Subject:* [EXTERNAL] Re: Flink reactive mode for application clusters on
> AWS EKS
>
>
>
> Hey!
>
> I think the reactive scaling is a somewhat misunderstood feature. It only
> works in standalone deployments (not in Kubernetes native for instace) and
> it doesn't actually provide any autoscaling functionality on its own.
> You would have to implement your scaling logic yourself somehow
> (Kubernetes HPA or something similar)
>
> I suggest looking at the Flink Kubernetes Operator (
> https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/
> )
> that will provide actual autoscaler capability for native Kubernetes
> deployments.
>
> Cheers,
> Gyula
>
>
>
> On Thu, Jan 12, 2023 at 6:23 PM Tamir Sagi 
> 

Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS EKS

2023-01-13 Thread Tamir Sagi
Hey Gyula,

Thanks for clarifying that.

We created a custom service before an official Flink k8s operator was released. 
That service deploys/upgrades/deletes clusters (no Yamls are needed). It 
handles failures including retries and cleanups based on our needs. Hence, 
moving to the official Flink operator might take a while.

Does the operator also perform scale down?

Regarding HPA, Task managers are created by Flink based on parallelism & number 
of slots. Then the cluster has fixed size of X JMs and Y TMs.
I was thinking about adding HPA but wondered whether or not Flink will handle 
the new TMs properly (I have not tested it).

We are probably left with the option to implement the auto scaling mechanism 
ourselves on top of Flink clusters.

Best,
Tamir.

From: Gyula Fóra 
Sent: Friday, January 13, 2023 8:39 AM
To: Swathi Chandrashekar 
Cc: Chesnay Schepler ; Tamir Sagi 
; user@flink.apache.org 
Subject: Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS 
EKS


EXTERNAL EMAIL


What I am trying to say is use the Kubernetes operator with Native (default) 
mode and forget about reactive .

The operator does everything you wwant plus has an actual autoscaler.

Gyula

On Fri, 13 Jan 2023 at 07:24, Swathi Chandrashekar 
mailto:cswa...@microsoft.com>> wrote:

Got it, so this means, we should have standalone app mode cluster which is 
managed by a flink Kubernetes operator and the operator would update the 
replicas based on the metrics ( autoscale ) which in-tern changes the 
parallelism as reactivemode is enabled.



Regards,

Swathi C



From: Gyula Fóra mailto:gyula.f...@gmail.com>>
Sent: Friday, January 13, 2023 11:31 AM
To: Swathi Chandrashekar mailto:cswa...@microsoft.com>>
Cc: Chesnay Schepler mailto:ches...@apache.org>>; Tamir 
Sagi mailto:tamir.s...@niceactimize.com>>; 
user@flink.apache.org
Subject: Re: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS 
EKS



No but the Kubernetes operator itself already provides similar feature set.



Not sure why you want the reactive mode in the first place . If it's because 
you want to implement auto scaling on top of it, then I think the operator is a 
better alternative.



I think you should try to understand what exactly the reactive mode provides vs 
what the operator does. Reactive mode alone doesn’t do too much.



Gyula



On Fri, 13 Jan 2023 at 06:33, Swathi Chandrashekar 
mailto:cswa...@microsoft.com>> wrote:

Hi @Gyula Fóra,



Does this mean, with Kubernetes operator, we can have reactive mode in native 
flink which is in app mode ? [ Not just standalone app mode ]



Regards,

Swathi C



From: Gyula Fóra mailto:gyula.f...@gmail.com>>
Sent: Thursday, January 12, 2023 11:14 PM
To: Tamir Sagi mailto:tamir.s...@niceactimize.com>>
Cc: Chesnay Schepler mailto:ches...@apache.org>>; 
user@flink.apache.org
Subject: [EXTERNAL] Re: Flink reactive mode for application clusters on AWS EKS



Hey!

I think the reactive scaling is a somewhat misunderstood feature. It only works 
in standalone deployments (not in Kubernetes native for instace) and it doesn't 
actually provide any autoscaling functionality on its own.
You would have to implement your scaling logic yourself somehow (Kubernetes HPA 
or something similar)

I suggest looking at the Flink Kubernetes Operator 
(https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/)
 that will provide actual autoscaler capability for native Kubernetes 
deployments.

Cheers,
Gyula



On Thu, Jan 12, 2023 at 6:23 PM Tamir Sagi 
mailto:tamir.s...@niceactimize.com>> wrote:

Hey Chesnay,



Just to be more clear,

I'm talking about plans to support reactive mode for application clusters in 
Native Kubernetes.



https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/resource-providers/native_kubernetes/#application-mode



Thanks,

Tamir.





From: Tamir Sagi 
mailto:tamir.s...@niceactimize.com>>

Re: sql-client.sh 终止后, 进程不会被 kill

2023-01-13 Thread Shengkai Fang
能 jstack 看看卡在哪里吗?并且提供下步骤该怎么复现这个。

Best,
Shengkai

<704669...@qq.com.invalid> 于2023年1月12日周四 22:03写道:

> Hi 各位,
>
>
>
> 碰到sql-client进程不会被kill, 如下所示
>
> ---
>
> Flink SQL>
>
> [4]+  Stopped ./bin/sql-client.sh
>
> [l3@node1 flink-1.16.0]$ jps
>
> 35040 SqlClient
>
> 20148 SqlClient
>
> 19284 NameNode
>
> 19540 GetConf
>
> 19733 RunJar
>
> 19544 Jps
>
> 19497 DataNode
>
> 9644 SqlClient
>
> 36063 SqlClient
>
>
>
> ---
>
>
>
> Best regards
>
>
>
> AboutMe
>
> *    Hi, I’m @lllong33
> *    I’m interested in Flink & dbt & StarRocks
>
>