Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-7989][yarn] do not deploy the dist.jar file twice #4951

Closed
wants to merge 2 commits into from

Conversation

NicoK
Copy link
Contributor

@NicoK NicoK commented Nov 6, 2017

What is the purpose of the change

We always add the dist.jar ourselves, but it could also be inside a shipped folder such as the "lib/" folder and was then distributed multiple times.

This PR is based on #4939 which changed the artefact uploads a bit.

Brief change log

  • also exclude the flink-dist*.jar from any (recursive) upload of a shipped directory, e.g. lib

Verifying this change

This change is already covered by existing tests, such as any test deploying a program on YARN (if it didn't include the flink-dist*.jar file, it would fail). Additionally, a manual deployment showed that flink-dist*.jar is only uploaded once.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (JavaDocs)

@@ -186,6 +186,8 @@ public void addShipFiles(List<File> shipFiles) {
for (File shipFile: shipFiles) {
// remove uberjar from ship list (by default everything in the lib/ folder is added to
// the list of files to ship, but we handle the uberjar separately.
// NOTE: this does not filter the uberjar if added recursively, e.g. by having the "lib"
// folder in the shipFiles
if (!(shipFile.getName().startsWith("flink-dist") && shipFile.getName().endsWith("jar"))) {
Copy link
Contributor

@zentol zentol Nov 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this filtering seems redundant now, the non-directory branch in uploadAndRegisterFiles should catch it.

However, I'm not sure if we should do any filtering in uploadAndRegisterFiles. We may want to pull the directory expansion into this method instead, and keep uploadAndRegisterFiles as a dumb upload method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh - you're right.

Regarding the change of uploadAndRegisterFiles: I wouldn't upload the shipfiles in addShipFiles yet, so if we changed that, we'd have to traverse through the directories twice as we definitely need to do that for the uploads and if we wanted to filter recursively in addShipFiles, too, then there as well.

@zentol
Copy link
Contributor

zentol commented Nov 6, 2017

Looks good, I think we can merge it once #4939 has been merged.

@NicoK
Copy link
Contributor Author

NicoK commented Nov 8, 2017

(rebased onto the newest #4939 which should fix the test failures shown by Travis on the previous build here)

Nico Kruber added 2 commits November 20, 2017 10:32
We always add the dist.jar ourselves, but it could also be inside a shipped
folder such as the "lib/" folder and was then distributed multiple times.
- remove unnecessary code path
- add documentation clearifying the methods' intentions
@NicoK
Copy link
Contributor Author

NicoK commented Nov 20, 2017

#4939 has been merged now - I rebased this PR now so we can go ahead

@NicoK
Copy link
Contributor Author

NicoK commented Nov 21, 2017

FYI: travis errors are unrelated (ERROR 404 during download of http://mirror.netcologne.de/apache.org/kafka/0.10.2.0/kafka_2.11-0.10.2.0.tgz)

zentol pushed a commit to zentol/flink that referenced this pull request Nov 29, 2017
We always add the dist.jar ourselves, but it could also be inside a shipped
folder such as the "lib/" folder and was then distributed multiple times.

This closes apache#4951.
zentol pushed a commit to zentol/flink that referenced this pull request Nov 29, 2017
We always add the dist.jar ourselves, but it could also be inside a shipped
folder such as the "lib/" folder and was then distributed multiple times.

This closes apache#4951.
@asfgit asfgit closed this in 520a74f Nov 29, 2017
asfgit pushed a commit that referenced this pull request Nov 29, 2017
We always add the dist.jar ourselves, but it could also be inside a shipped
folder such as the "lib/" folder and was then distributed multiple times.

This closes #4951.
glaksh100 pushed a commit to lyft/flink that referenced this pull request Jun 6, 2018
We always add the dist.jar ourselves, but it could also be inside a shipped
folder such as the "lib/" folder and was then distributed multiple times.

This closes apache#4951.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants