Skip to content

Commit

Permalink
Merge pull request #32 from lyft/DATA-10803
Browse files Browse the repository at this point in the history
Do not localize s3 files
  • Loading branch information
catalinii authored Apr 14, 2021
2 parents 8805e1a + a8aef8f commit c879a5d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,12 @@ private[spark] class Client(
val localPath = getQualifiedLocalPath(localURI, hadoopConf)
val linkname = targetDir.map(_ + "/").getOrElse("") +
destName.orElse(Option(localURI.getFragment())).getOrElse(localPath.getName())
val destPath = copyFileToRemote(destDir, localPath, replication, symlinkCache)
var destPath = localPath
if (!localPath.toUri.getScheme.startsWith("s3")) {
destPath = copyFileToRemote(destDir, localPath, replication, symlinkCache)
} else {
logInfo(s"Adding binary from location: $destPath to the distributed cache")
}
val destFs = FileSystem.get(destPath.toUri(), hadoopConf)
distCacheMgr.addResource(
destFs, hadoopConf, destPath, localResources, resType, linkname, statCache,
Expand Down

0 comments on commit c879a5d

Please sign in to comment.