Skip to content

Commit

Permalink
[YARN] SPARK-2577: File upload to viewfs is broken due to mount point…
Browse files Browse the repository at this point in the history
… re...

Opting to the option 2 defined in SPARK-2577, i.e., retrieve and pass the correct file system object to addResource.

Author: Gera Shegalov <[email protected]>

Closes apache#1483 from gerashegalov/master and squashes the following commits:

90c9087 [Gera Shegalov] [YARN] SPARK-2577: File upload to viewfs is broken due to mount point resolution
  • Loading branch information
gerashegalov authored and conviva-zz committed Sep 4, 2014
1 parent 8131462 commit 93483d5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ trait ClientBase extends Logging {
if (!ClientBase.LOCAL_SCHEME.equals(localURI.getScheme())) {
val setPermissions = if (destName.equals(ClientBase.APP_JAR)) true else false
val destPath = copyRemoteFile(dst, qualifyForLocal(localURI), replication, setPermissions)
distCacheMgr.addResource(fs, conf, destPath, localResources, LocalResourceType.FILE,
val destFs = FileSystem.get(destPath.toUri(), conf)
distCacheMgr.addResource(destFs, conf, destPath, localResources, LocalResourceType.FILE,
destName, statCache)
} else if (confKey != null) {
sparkConf.set(confKey, localPath)
Expand Down

0 comments on commit 93483d5

Please sign in to comment.