20 Temmuz 2023 Perşembe

Apache Flink Modları

Giriş
Açıklaması şöyle
Flink can execute application in one of these three ways:
1. Application Mode
2. Per-Job Mode
3. Session Mode

The main differences between these three ways are:

- Cluster lifecycle and resource isolation
- Whether the application’s main() method is executed on the client or on the cluster
Şeklen şöyle
1. Application Mode
Yeni bir cluster yaratır. Açıklaması şöyle. İşler birbirlerinden tam anlamıyla yalıtılır
In this mode, you need to deploy the Flink image everytime having your job placed in the lib folder. What does this means?

Basically, the flink job is a fat jar containing your logic + dependencies. Now the flink cluster in application mode, running your job is especially created to execute your job only. That means no other job shares your flink cluster. So let’s say you may have 3 jobs to run, so in application mode you need to create 3 flink clusters.

2. Session Mode
Açıklaması şöyle
In this mode, you needn’t have to deploy the whole flink cluster again. All required is to to deploy the fat jar with your fixes/enhancements & deploy it.

Now how you deploy is to stop the current jar execution & start the new one. Rest api’s are provided to do this as well command prompt based shell script can do the magic as well to stop & submit the job.




Hiç yorum yok:

Yorum Gönder