[ https://issues.apache.org/jira/browse/YARN-9273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16780697#comment-16780697 ]
Masahiro Tanaka commented on YARN-9273: --------------------------------------- Thank you for commenting on this [~eyang] and [~csingh]!. I think we have 2 options to fix this issue. # Checking the current number of containers of the existing components first, then add or subtract the numbers. # Changing the Component spec to specify that this is a relative number, as [~csingh] mentioned (say, adding another field to Component Spec, or holding the {{number_of_containers}} as a string?) I chose option 1 because changing the Component Spec means changing the public API, and it seems to me that it's a bit overkill. But if you prefer option 2 (or other options), either method will suffice. First of all, I'll try to implement option 2 as a proof-of-concept. {quote} Also, similar logic to what is being added in this patch, already exists in ServiceClient-> parseNumberOfContainers. {quote} I didn't notice that. Will fix that part. > Flexing a component of YARN service does not work as documented when using > relative number > ------------------------------------------------------------------------------------------ > > Key: YARN-9273 > URL: https://issues.apache.org/jira/browse/YARN-9273 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Masahiro Tanaka > Assignee: Masahiro Tanaka > Priority: Minor > Attachments: YARN-9273.001.patch, YARN-9273.002.patch, > YARN-9273.003.patch, YARN-9273.004.patch > > > [The > documents|https://hadoop.apache.org/docs/r3.2.0/hadoop-yarn/hadoop-yarn-site/yarn-service/QuickStart.html] > says, > "Relative changes are also supported for the ${NUMBER_OF_CONTAINERS} in the > flex command, such as +2 or -2." when you want to flex a component of a YARN > service. > I expected that {{yarn app -flex sleeper-service -component sleeper +1}} > increments the number of container, but actually it sets the number of > container to just one. > I guess ApiServiceClient#actionFlex treats flexing when executing the {{yarn > app -flex}}, and it just uses {{Long.parseLong}} to convert the argument like > {{+1}}, which doesn't care relative numbers. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org