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

2021-02-10 Thread Szilard Nemeth (Jira)


 [ 
https://issues.apache.org/jira/browse/YARN-10593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Szilard Nemeth updated YARN-10593:
--
Fix Version/s: 3.4.0

> 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
> Fix For: 3.4.0
>
> Attachments: YARN-10593-001.patch
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org



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

2021-02-08 Thread Peter Bacsko (Jira)


 [ 
https://issues.apache.org/jira/browse/YARN-10593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Bacsko updated YARN-10593:

Attachment: YARN-10593-001.patch

> 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
> Attachments: YARN-10593-001.patch
>
>
> 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-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org