-
Notifications
You must be signed in to change notification settings - Fork 751
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
Conversation
44394b4
to
70cab90
Compare
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; |
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.
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?
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.
We are getting this value in Azkaban job in case of an empty string.
70cab90
to
c31c64c
Compare
Map<String, String> inversePlaceholderMap = ImmutableBiMap.copyOf(Splitter.on(",").withKeyValueSeparator(":") | ||
.split(convertedProperties.get(PLACEHOLDER_MAP_KEY).toString())).inverse(); |
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 the prop named PLACEHOLDER_MAP_KEY
were not found, would it .split("null")
?
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.
Nice catch. Handled it and added unit tests around it.
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
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
Tested locally using test Azkaban project
Added relevant unit tests
Commits