[
https://issues.apache.org/jira/browse/YARN-9444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810826#comment-16810826
]
Szilard Nemeth commented on YARN-9444:
--------------------------------------
Hi [~shuzirra]!
Thanks for the patch!
Few comments:
1. You could extract the prefix strings ("mapreduce.mapper.proper.rt." /
"mapreduce.mapper.incorrect.rt.") and use them for the config values as well.
2. Can you please use some more verbose asserts? I mean instead of asserting
size of the list, you could assert if all the required strings are contained in
the list. You can use assertThat and containsInAnyOrder in combination, see:
https://www.mkyong.com/unittest/junit-how-to-test-a-list/
Thanks!
> YARN Api Resource Utils's getRequestedResourcesFromConfig doesn't recognise
> yarn.io/gpu as a valid resource type
> ----------------------------------------------------------------------------------------------------------------
>
> Key: YARN-9444
> URL: https://issues.apache.org/jira/browse/YARN-9444
> Project: Hadoop YARN
> Issue Type: Bug
> Components: api
> Reporter: Gergely Pollak
> Assignee: Gergely Pollak
> Priority: Minor
> Attachments: YARN-9444.001.patch
>
>
> The original issue was the jobclient test did not send the requested resource
> type, when specified in the command line eg:
> {code:java}
> hadoop jar hadoop-mapreduce-client-jobclient-tests.jar sleep
> -Dmapreduce.reduce.resource.yarn.io/gpu=1 -m 10 -r 1 -mt 90000
> {code}
> After some investigation, it turned out it only affects resource types with
> name containing '.' characters. And the root cause is regexp from the
> getRequestedResourcesFromConfig method.
> {code:java}
> "^" + Pattern.quote(prefix) + "[^.]+$"
> {code}
> This regexp explicitly forbids any dots in the resource type name, which is
> inconsistent with the default resource type for gpu and fpga, which are
> yarn.io/gpu and yarn.io/fpga respectively.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]