Peter Bacsko created YARN-10593: ----------------------------------- Summary: 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
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-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-dev-h...@hadoop.apache.org