You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2021/01/25 13:03:00 UTC

[jira] [Commented] (YARN-10593) Fix incorrect string comparison in GpuDiscoverer

    [ https://issues.apache.org/jira/browse/YARN-10593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17271298#comment-17271298 ] 

Peter Bacsko commented on YARN-10593:
-------------------------------------

Unfortunately, Zoltan Siegl's comment has not been addressed: https://issues.apache.org/jira/browse/YARN-9217?focusedCommentId=16763445&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16763445

> Fix incorrect string comparison in GpuDiscoverer
> ------------------------------------------------
>
>                 Key: YARN-10593
>                 URL: https://issues.apache.org/jira/browse/YARN-10593
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Major
>
> The following comparison in {{GpuDiscoverer}} is invalid:
> {noformat}
>        binaryPath = configuredBinaryFile;
>       // If path exists but file name is incorrect don't execute the file
>       String fileName = binaryPath.getName();
>       if (DEFAULT_BINARY_NAME.equals(fileName)) {  <--- inverse condition needed
>         String msg = String.format("Please check the configuration value of"
>              +" %s. It should point to an %s binary.",
>              YarnConfiguration.NM_GPU_PATH_TO_EXEC,
>              DEFAULT_BINARY_NAME);
>         throwIfNecessary(new YarnException(msg), config);
>         LOG.warn(msg);
>       }{noformat}
> Obviously it should be other way around - we should log a warning or throw an exception if the file names *differ*, not when they're equal.
> Consider adding a unit test for this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org