public class DfsFacade extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DfsFacade.DfsFacadeException |
static class |
DfsFacade.Localizer |
| Constructor and Description |
|---|
DfsFacade(com.typesafe.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect() |
boolean |
exists(org.apache.hadoop.fs.Path path) |
org.apache.hadoop.fs.Path |
getUploadPath(File localArchiveFile) |
org.apache.hadoop.fs.Path |
getUploadPath(String baseName) |
boolean |
isLocalized() |
org.apache.hadoop.yarn.api.records.LocalResource |
makeResource(org.apache.hadoop.fs.Path dfsPath,
org.apache.hadoop.fs.FileStatus dfsFileStatus,
org.apache.hadoop.yarn.api.records.LocalResourceType type,
org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility)
Create a local resource definition for YARN.
|
void |
removeDrillFile(String fileName) |
void |
uploadArchive(File localArchiveFile,
org.apache.hadoop.fs.Path destPath,
String label) |
public boolean isLocalized()
public void connect()
throws DfsFacade.DfsFacadeException
DfsFacade.DfsFacadeExceptionpublic boolean exists(org.apache.hadoop.fs.Path path)
throws IOException
IOExceptionpublic org.apache.hadoop.fs.Path getUploadPath(File localArchiveFile)
public org.apache.hadoop.fs.Path getUploadPath(String baseName)
public void uploadArchive(File localArchiveFile, org.apache.hadoop.fs.Path destPath, String label) throws DfsFacade.DfsFacadeException
DfsFacade.DfsFacadeExceptionpublic org.apache.hadoop.yarn.api.records.LocalResource makeResource(org.apache.hadoop.fs.Path dfsPath,
org.apache.hadoop.fs.FileStatus dfsFileStatus,
org.apache.hadoop.yarn.api.records.LocalResourceType type,
org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility)
throws DfsFacade.DfsFacadeException
YARN uses the size and timestamp are used to check if the file has changed on HDFS to check if YARN can use an existing copy, if any.
Resources are made public.
conf - Configuration created from the Hadoop config files, in this case,
identifies the target file system.resourcePath - the path (relative or absolute) to the file on the configured file
system (usually HDFS).IOException - if the resource does not exist on the configured file systemDfsFacade.DfsFacadeExceptionpublic void removeDrillFile(String fileName) throws DfsFacade.DfsFacadeException
DfsFacade.DfsFacadeExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.