code: private void copyJarToHDFS(FileSystem fs, Path localJarPath, String md5sum, Path remoteJarPath, Path remoteMd5Path)
        throws IOException {
  
      LOG.info("Copying {} to {}", localJarPath.toUri().toASCIIString(), remoteJarPath.toUri().toASCIIString());
      fs.copyFromLocalFile(localJarPath, remoteJarPath);
      // create the MD5 file for this jar.
      createMd5SumFile(fs, md5sum, remoteMd5Path);
  
      // we need to clean the tmp files that are are created by JarFinder after the JVM exits.
      if (remoteJarPath.getName().startsWith(JarFinder.TMP_HADOOP)) {
        fs.deleteOnExit(remoteJarPath);
      }
      // same for the MD5 file.
      if (remoteMd5Path.getName().startsWith(JarFinder.TMP_HADOOP)) {
        fs.deleteOnExit(remoteMd5Path);
      }
    }
docs: @param fs
  File system where to upload the jar.
  @param localJarPath
  The local path where we find the jar.
  @param md5sum
  The MD5 sum of the local jar.
  @param remoteJarPath
  The remote path where to upload the jar.
  @param remoteMd5Path
  The remote path where to create the MD5 file.
  
  @throws IOException