public class HdfsBackupRepository extends Object implements BackupRepository
BackupRepository.PathType| Modifier and Type | Field and Description |
|---|---|
protected int |
copyBufferSize
Deprecated.
|
| Constructor and Description |
|---|
HdfsBackupRepository()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
void |
copyIndexFileFrom(Directory sourceDir,
String sourceFileName,
URI destDir,
String destFileName)
Deprecated.
Copy an index file from specified
sourceDir to the destination repository (i.e. |
void |
copyIndexFileTo(URI sourceRepo,
String sourceFileName,
Directory dest,
String destFileName)
Deprecated.
Copy an index file from specified
sourceRepo to the destination directory (i.e. |
void |
createDirectory(URI path)
Deprecated.
This method creates a directory at the specified path.
|
OutputStream |
createOutput(URI path)
Deprecated.
This method returns a OutputStream instance for the specified
path |
URI |
createURI(String location)
Deprecated.
This method returns the URI representation for the specified path.
|
void |
delete(URI path,
Collection<String> files,
boolean ignoreNoSuchFileException)
Deprecated.
Delete
files at path |
void |
deleteDirectory(URI path)
Deprecated.
This method deletes a directory at the specified path.
|
boolean |
exists(URI path)
Deprecated.
This method checks if the specified path exists in this repository.
|
<T> T |
getConfigProperty(String name)
Deprecated.
This method returns the value of the specified configuration property.
|
BackupRepository.PathType |
getPathType(URI path)
Deprecated.
This method returns the type of a specified path
|
void |
init(NamedList args)
Deprecated.
|
String[] |
listAll(URI path)
Deprecated.
This method returns all the entries (files and directories) in the specified directory.
|
IndexInput |
openInput(URI dirPath,
String fileName,
IOContext ctx)
Deprecated.
This method returns a Lucene input stream reading an existing file.
|
URI |
resolve(URI baseUri,
String... pathComponents)
Deprecated.
This method resolves a URI using the specified path components (as method arguments).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchecksum, copyFileFrom, copyFileTo, copyIndexFileFrom, getBackupLocation, listAllOrEmptypublic void init(NamedList args)
init in interface NamedListInitializedPluginpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic <T> T getConfigProperty(String name)
BackupRepositorygetConfigProperty in interface BackupRepositorypublic URI createURI(String location)
BackupRepositorycreateURI in interface BackupRepositorylocation - The path specified by the user.public URI resolve(URI baseUri, String... pathComponents)
BackupRepositoryresolve in interface BackupRepositorybaseUri - The base URI to use for creating the pathpathComponents - The directory (or file-name) to be included in the URI.public boolean exists(URI path) throws IOException
BackupRepositoryexists in interface BackupRepositorypath - The path whose existence needs to be checked.IOException - in case of errorspublic BackupRepository.PathType getPathType(URI path) throws IOException
BackupRepositorygetPathType in interface BackupRepositorypath - The path whose type needs to be checked.IOException - in case of errorspublic String[] listAll(URI path) throws IOException
BackupRepositorylistAll in interface BackupRepositorypath - The directory pathIOException - in case of errorspublic IndexInput openInput(URI dirPath, String fileName, IOContext ctx) throws IOException
BackupRepositoryopenInput in interface BackupRepositorydirPath - The parent directory of the file to be readfileName - The name of the file to be readctx - the Lucene IO contextIOException - in case of errorspublic OutputStream createOutput(URI path) throws IOException
BackupRepositorypathcreateOutput in interface BackupRepositorypath - The path for which OutputStream needs to be createdpathIOException - in case of errorspublic void createDirectory(URI path) throws IOException
BackupRepositorycreateDirectory in interface BackupRepositorypath - The path where the directory needs to be created.IOException - in case of errorspublic void deleteDirectory(URI path) throws IOException
BackupRepositorydeleteDirectory in interface BackupRepositorypath - The path referring to the directory to be deleted.IOException - in case of errorspublic void copyIndexFileFrom(Directory sourceDir, String sourceFileName, URI destDir, String destFileName) throws IOException
BackupRepositorysourceDir to the destination repository (i.e. backup).copyIndexFileFrom in interface BackupRepositorysourceDir - The source directory hosting the file to be copied.sourceFileName - The name of the file to by copieddestDir - The destination backup location.IOException - in case of errorsCorruptIndexException - in case checksum of the file does not match with precomputed checksum stored at the end of the filepublic void copyIndexFileTo(URI sourceRepo, String sourceFileName, Directory dest, String destFileName) throws IOException
BackupRepositorysourceRepo to the destination directory (i.e. restore).copyIndexFileTo in interface BackupRepositorysourceRepo - The source URI hosting the file to be copied.dest - The destination where the file should be copied.IOException - in case of errors.public void delete(URI path, Collection<String> files, boolean ignoreNoSuchFileException) throws IOException
BackupRepositoryfiles at pathdelete in interface BackupRepositoryIOExceptionCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.