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.DfsFacadeException
public boolean exists(org.apache.hadoop.fs.Path path) throws IOException
IOException
public 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.DfsFacadeException
public 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 to check if the file has changed on HDFS and to check if YARN can use an existing copy, if any.
Resources are made public.
dfsPath
- the path (relative or absolute) to the file on the configured file
system (usually HDFS).dfsFileStatus
- the file status of the configured file systemtype
- local resource type (archive, file, or pattern)visibility
- local resource visibility (public, private, or application)IOException
- if the resource does not exist on the configured file systemDfsFacade.DfsFacadeException
public void removeDrillFile(String fileName) throws DfsFacade.DfsFacadeException
DfsFacade.DfsFacadeException
Copyright © 1970 The Apache Software Foundation. All rights reserved.