Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.api.records.LocalResource |
getLocalResourceForPath(org.apache.hadoop.fs.Path jarPath,
org.apache.hadoop.yarn.api.records.LocalResourceType type)
Creates a LocalResource instance for the JAR file referenced by the given Path.
|
org.apache.hadoop.fs.Path |
getPath() |
org.apache.hadoop.fs.Path |
upload(File localFile)
Upload given file to the DFS.
|
org.apache.hadoop.yarn.api.records.LocalResource |
uploadAsLocalResource(File localFile,
org.apache.hadoop.yarn.api.records.LocalResourceType type)
Shortcut to first upload the file and then form a LocalResource for the YARN submission.
|
public org.apache.hadoop.fs.Path upload(File localFile) throws IOException
localFile
- File on local FS to upload to the (remote) DFS.IOException
- if unable to upload the file or local file cannot be read.public org.apache.hadoop.yarn.api.records.LocalResource uploadAsLocalResource(File localFile, org.apache.hadoop.yarn.api.records.LocalResourceType type) throws IOException
localFile
- File on local FS to upload to the (remote) DFS.IOException
- if unable to upload the file or local file cannot be read.public org.apache.hadoop.yarn.api.records.LocalResource getLocalResourceForPath(org.apache.hadoop.fs.Path jarPath, org.apache.hadoop.yarn.api.records.LocalResourceType type) throws IOException
IOException
public org.apache.hadoop.fs.Path getPath()
Copyright © 2017 The Apache Software Foundation. All rights reserved.