public class S3BackupRepository extends Object implements BackupRepository
BackupRepository interface supporting backup/restore of Solr
indexes to S3.BackupRepository.PathType| Constructor and Description |
|---|
S3BackupRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
copyIndexFileFrom(Directory sourceDir,
String sourceFileName,
URI dest,
String destFileName)
Copy an index file from specified
sourceDir to the destination repository (i.e. |
void |
copyIndexFileTo(URI sourceDir,
String sourceFileName,
Directory dest,
String destFileName)
Copy an index file from specified
sourceRepo to the destination directory (i.e. |
void |
createDirectory(URI path) |
URI |
createDirectoryURI(String location) |
OutputStream |
createOutput(URI path) |
URI |
createURI(String location) |
void |
delete(URI path,
Collection<String> files,
boolean ignoreNoSuchFileException) |
void |
deleteDirectory(URI path) |
boolean |
exists(URI path) |
<T> T |
getConfigProperty(String name) |
BackupRepository.PathType |
getPathType(URI path) |
void |
init(NamedList args) |
String[] |
listAll(URI path)
This method returns all the entries (files and directories) in the specified directory.
|
IndexInput |
openInput(URI path,
String fileName,
IOContext ctx) |
URI |
resolve(URI baseUri,
String... pathComponents) |
URI |
resolveDirectory(URI baseUri,
String... pathComponents) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchecksum, copyFileFrom, copyFileTo, copyIndexFileFrom, getBackupLocation, listAllOrEmptypublic void init(NamedList args)
init in interface NamedListInitializedPluginpublic <T> T getConfigProperty(String name)
getConfigProperty in interface BackupRepositorypublic URI createURI(String location)
createURI in interface BackupRepositorypublic URI createDirectoryURI(String location)
createDirectoryURI in interface BackupRepositorypublic URI resolve(URI baseUri, String... pathComponents)
resolve in interface BackupRepositorypublic URI resolveDirectory(URI baseUri, String... pathComponents)
resolveDirectory in interface BackupRepositorypublic void createDirectory(URI path) throws IOException
createDirectory in interface BackupRepositoryIOExceptionpublic void deleteDirectory(URI path) throws IOException
deleteDirectory in interface BackupRepositoryIOExceptionpublic void delete(URI path, Collection<String> files, boolean ignoreNoSuchFileException) throws IOException
delete in interface BackupRepositoryIOExceptionpublic boolean exists(URI path) throws IOException
exists in interface BackupRepositoryIOExceptionpublic IndexInput openInput(URI path, String fileName, IOContext ctx) throws IOException
openInput in interface BackupRepositoryIOExceptionpublic OutputStream createOutput(URI path) throws IOException
createOutput in interface BackupRepositoryIOExceptionpublic String[] listAll(URI path) throws IOException
listAll in interface BackupRepositorypath - The directory pathIOExceptionpublic BackupRepository.PathType getPathType(URI path) throws IOException
getPathType in interface BackupRepositoryIOExceptionpublic void copyIndexFileFrom(Directory sourceDir, String sourceFileName, URI dest, String destFileName) throws IOException
sourceDir 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 be copieddest - 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 sourceDir, String sourceFileName, Directory dest, String destFileName) throws IOException
sourceRepo to the destination directory (i.e.
restore).copyIndexFileTo in interface BackupRepositorysourceDir - 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 close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.