How to use a thin jar instead of a fat jar?

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

How to use a thin jar instead of a fat jar?

HarshithBolar

Hi folks,

 

We're currently deploying our Flink applications as a fat-jar using the maven-shade-plugin. Problem is, each application jar ends up being approximately 130-140 MB which is a pain to build and deploy every time. Is there a way to exclude dependencies and just deploy a thin jar to the cluster which comes up to about 50 kB?

 

Thanks,

Harshith

 

Reply | Threaded
Open this post in threaded view
|

Re: How to use a thin jar instead of a fat jar?

Jörn Franke
You don’t need to include the flink libraries themselves in the fat jar ! You can put them as provided and this reduces the jar size! They are already provided by your Flink installation. One exception is the table API but I simply recommend to put it in your flink distribution folder (if your flink Installation is >= 1.5) so it also can be marked as provided in your build file.

Am 03.10.2018 um 12:18 schrieb Kumar Bolar, Harshith <[hidden email]>:

Hi folks,

 

We're currently deploying our Flink applications as a fat-jar using the maven-shade-plugin. Problem is, each application jar ends up being approximately 130-140 MB which is a pain to build and deploy every time. Is there a way to exclude dependencies and just deploy a thin jar to the cluster which comes up to about 50 kB?

 

Thanks,

Harshith