code: private Path calculateDestJarFile(FileStatus status, Path jarFileDir) {
      // SNAPSHOT jars should not be shared, as different jobs may be using different versions of it
      Path baseDir = status.getPath().getName().contains("SNAPSHOT") ? this.unsharedJarsDir : jarFileDir;
      // DistributedCache requires absolute path, so we need to use makeQualified.
      return new Path(this.fs.makeQualified(baseDir), status.getPath().getName());
    }
docs: Calculate the target filePath of the jar file to be copied on HDFS,
  given the {@link FileStatus} of a jarFile and the path of directory that contains jar.