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

Add support for sending proxy jvm args to Yarn AM and Containers #4075

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

abhishekmjain
Copy link
Contributor

@abhishekmjain abhishekmjain commented Nov 13, 2024

Dear Gobblin maintainers,

Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!

JIRA

Description

  • Here are some details about my PR, including screenshots (if applicable):
    It allows proxy jvm args to be sent to Yarn AM and Containers which are retrieved from a new property.

Added custom handling for emptyStringPlaceholder since that's the value of config getting passed when the string is actually emtpy.

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:
    Tested locally using test Azkaban project
    Added relevant unit tests

Commits

  • My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Comment on lines 245 to 250
String proxyConfigValue = config.hasPath(GobblinYarnConfigurationKeys.YARN_APPLICATION_PROXY_JVM_ARGS) ?
config.getString(GobblinYarnConfigurationKeys.YARN_APPLICATION_PROXY_JVM_ARGS) : StringUtils.EMPTY;

//We get config value as emptyStringPlaceholder when the string is actually supposed to be empty
this.proxyJvmArgs = proxyConfigValue.contains(GobblinYarnConfigurationKeys.EMPTY_STRING_PLACEHOLDER)
? StringUtils.EMPTY : proxyConfigValue;
Copy link
Contributor

Choose a reason for hiding this comment

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

as you set it to empty when !config.hasPath(GobblinYarnConfigurationKeys.YARN_APPLICATION_PROXY_JVM_ARGS), what does this placeholder allow that just leaving out the property (or setting it to empty) would not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are getting this value in Azkaban job in case of an empty string.

Comment on lines +36 to +37
Map<String, String> inversePlaceholderMap = ImmutableBiMap.copyOf(Splitter.on(",").withKeyValueSeparator(":")
.split(convertedProperties.get(PLACEHOLDER_MAP_KEY).toString())).inverse();
Copy link
Contributor

Choose a reason for hiding this comment

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

if the prop named PLACEHOLDER_MAP_KEY were not found, would it .split("null")?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. Handled it and added unit tests around it.

@phet phet merged commit 4bb0c40 into apache:master Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants