You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by "Kumar Bolar, Harshith" <hk...@arity.com> on 2018/10/03 10:18:13 UTC

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

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


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

Posted by Jörn Franke <jo...@gmail.com>.
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 <hk...@arity.com>:
> 
> 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
>