-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-13938][yarn] Enable configure shared libraries on YARN #10187
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
Conversation
9f8bb18 to
e1c1980
Compare
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit e1c1980 (Thu Nov 14 06:09:18 UTC 2019) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
e1c1980 to
5363eb5
Compare
5363eb5 to
6ee5b27
Compare
yanghua
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tisonkun Thanks for implementing this feature. I think it would be helpful for the users who use Flink on Yarn. I left some tiny comments you can consider. Do not know whether this (partial) feature can be tested with a unit test or not. If we can not, did you tested it offline?
| <tr> | ||
| <td><h5>yarn.shared-libraries</h5></td> | ||
| <td style="word-wrap: break-word;">(none)</td> | ||
| <td>specify the path to use public visibility feature of YARN NodeManager localizing resources.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we capitalize the first letter? Like other config option description.
| /** Lazily initialized list of files to ship. */ | ||
| private final List<File> shipFiles = new LinkedList<>(); | ||
|
|
||
| private final List<Path> sharedLibs = new LinkedList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to test this feature like ship files, we may expose getter/setter methods of this field.
| applicationId = new Option(shortPrefix + "id", longPrefix + "applicationId", true, "Attach to running YARN session"); | ||
| queue = new Option(shortPrefix + "qu", longPrefix + "queue", true, "Specify YARN queue."); | ||
| shipPath = new Option(shortPrefix + "t", longPrefix + "ship", true, "Ship files in the specified directory (t for transfer)"); | ||
| sharedLibs = new Option(shortPrefix + "sl", longPrefix + "sharedLibs", true, "Upload a copy of flink libs beforehand and specify the path to use public visibility feature of YARN NodeManager localizing resources."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test case about this config option or the whole feature like ship files?
| .stringType() | ||
| .asList() | ||
| .noDefaultValue() | ||
| .withDescription("specify the path to use public visibility feature of " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, shall we capitalize the first letter? Like other config option description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. Will update.
|
I'd like to add a unit test but fail to have an idea how to start a mini HDFS. Let me think of how to introduce it within YarnTestBase... |
|
I've manually verify the changes locally. My rough thought about testing is using a test job running with YarnTestBase and verify the resource, maybe we have to verify no files uploaded by Flink also. |
| while (i.hasNext()) { | ||
| LocatedFileStatus fileStatus = i.next(); | ||
| if (fileStatus.isFile()) { | ||
| String classpath = setupSharedLib(fileStatus.getPath(), fs, remotePaths, localResources, envShipFileList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we flatten all files in the root relative path of program. Maybe it is better we keep the directory layout. Locally changed and verifying...
|
closed for now in favor of another issue. After discussion with @wangyang0918 I notice FLINK-13938 is not what proposed here. |
|
sorry for the late follow up @tisonkun . I come to understand that this PR is for something different from FLINK-13938. did we create a new JIRA ticket? I think the approach this PR implements is highly valuable especially for a production cluster setup :-) --Rong |
What is the purpose of the change
Enable configure shared libraries on YARN. See also https://issues.apache.org/jira/browse/FLINK-13938
Brief change log
-ysl--yarnsharedLibsand config optionyarn.shared-librariesVerifying this change
I am looking for adding a test case but it seems hard without a real HDFS env. Maybe e2e tests required. But one can still verify it manually.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation
cc @wangyang0918