public class HadoopUtils
extends java.lang.Object
| Constructor and Description |
|---|
HadoopUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.hadoop.yarn.api.records.LocalResource |
createLocalResource(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path provisionedResourcePath)
Creates a single
LocalResource for the provisioned resource identified with Path |
static java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.LocalResource> |
createLocalResources(org.apache.hadoop.fs.FileSystem fs,
java.lang.String classPathDir)
Creates
LocalResources based on the current user's classpath |
static org.apache.hadoop.fs.FileSystem |
getFileSystem(org.apache.hadoop.conf.Configuration configuration) |
static org.apache.hadoop.fs.Path |
provisionResourceToFs(java.io.File localResource,
org.apache.hadoop.fs.FileSystem fs,
java.lang.String applicationName)
Provisions resource represented as
File to the FileSystem for a given application |
public static org.apache.hadoop.fs.FileSystem getFileSystem(org.apache.hadoop.conf.Configuration configuration)
configuration - public static java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.LocalResource> createLocalResources(org.apache.hadoop.fs.FileSystem fs,
java.lang.String classPathDir)
LocalResources based on the current user's classpathfs - classPathDir - public static org.apache.hadoop.fs.Path provisionResourceToFs(java.io.File localResource,
org.apache.hadoop.fs.FileSystem fs,
java.lang.String applicationName)
throws java.lang.Exception
File to the FileSystem for a given applicationlocalResource - fs - applicationName - java.lang.Exceptionpublic static org.apache.hadoop.yarn.api.records.LocalResource createLocalResource(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path provisionedResourcePath)
LocalResource for the provisioned resource identified with Pathfs - provisionedResourcePath -