Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
The following comparison in GpuDiscoverer is invalid:
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); }
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.