1
votes

I'm playing around with flink and made some small changes in the package runtime.io.network.

To test these changes I always have to rebuild the whole maven project like this:

mvn clean install -Dcheckstyle.skip -Drat.skip=true -DskipTests -T 1C

(skipping tests etc. to make it faster)

Is there a way to rebuild the flink distribution to execute it with the changes I made faster?

Eg. if I just run this example:

./bin/flink run -p 2 ./examples/batch/WordCount.jar --input words.txt

I tried to use these commands, but my changes did not show up then when running:

-pl, --projects
        Build specified reactor projects instead of all projects
-am, --also-make
        If project list is specified, also build projects required by the list

Any ideas?

2

2 Answers

0
votes

You can speed up the build process by only building the affected modules plus flink-dist. For example, if you only touched flink-runtime, then you could run the following command to make your changes visible:

mvn clean install -DskipTests -pl flink-runtime,flink-dist

Building flink-dist will take the jars of all modules and build the binary distribution. The binary distribution will then be accessible by following the build-target soft link in the Flink home directory.

0
votes

The best way in my case was removing the "clean" in my command.

This way I was able to optimize from 8min to 2min.