Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10147

FPGA plugin can't find the localized aocx file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • nodemanager
    • None
    • Reviewed

    Description

      There's a bug in the FPGA plugin which is intended to find the localized "aocx" file:

      ...
          if (localizedResources != null) {
            Optional<Path> aocxPath = localizedResources
                .keySet()
                .stream()
                .filter(path -> matchesIpid(path, id))
                .findFirst();
      
            if (aocxPath.isPresent()) {
              ipFilePath = aocxPath.get().toUri().toString();
              LOG.debug("Found: " + ipFilePath);
            }
          } else {
            LOG.warn("Localized resource is null!");
          }
      
          return ipFilePath;
        }
      
        private boolean matchesIpid(Path p, String id) {
          return p.getName().toLowerCase().equals(id.toLowerCase())
              && p.getName().endsWith(".aocx");
        }
      

      The method matchesIpid() works incorrecty: the id argument is the expected filename, but without the extension. Therefore the equals() comparison will always be false.

      Attachments

        1. YARN-10147-003.patch
          5 kB
          Peter Bacsko
        2. YARN-10147-002.patch
          5 kB
          Peter Bacsko
        3. YARN-10147-001.patch
          5 kB
          Peter Bacsko

        Activity

          People

            pbacsko Peter Bacsko
            pbacsko Peter Bacsko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: