Class S3BackupRepository

    • Constructor Detail

      • S3BackupRepository

        public S3BackupRepository()
    • Method Detail

      • getConfigProperty

        public <T> T getConfigProperty​(String name)
      • createURI

        public URI createURI​(String location)
      • createDirectoryURI

        public URI createDirectoryURI​(String location)
      • resolve

        public URI resolve​(URI baseUri,
                           String... pathComponents)
      • resolveDirectory

        public URI resolveDirectory​(URI baseUri,
                                    String... pathComponents)
      • openInput

        public org.apache.lucene.store.IndexInput openInput​(URI path,
                                                            String fileName,
                                                            org.apache.lucene.store.IOContext ctx)
                                                     throws IOException
        Throws:
        IOException
      • listAll

        public String[] listAll​(URI path)
                         throws IOException
        This method returns all the entries (files and directories) in the specified directory.
        Parameters:
        path - The directory path
        Returns:
        an array of strings, one for each entry in the directory
        Throws:
        IOException
      • copyIndexFileFrom

        public void copyIndexFileFrom​(org.apache.lucene.store.Directory sourceDir,
                                      String sourceFileName,
                                      URI dest,
                                      String destFileName)
                               throws IOException
        Copy an index file from specified sourceDir to the destination repository (i.e. backup).
        Parameters:
        sourceDir - The source directory hosting the file to be copied.
        sourceFileName - The name of the file to be copied
        dest - The destination backup location.
        Throws:
        IOException - in case of errors
        org.apache.lucene.index.CorruptIndexException - in case checksum of the file does not match with precomputed checksum stored at the end of the file
      • copyIndexFileTo

        public void copyIndexFileTo​(URI sourceDir,
                                    String sourceFileName,
                                    org.apache.lucene.store.Directory dest,
                                    String destFileName)
                             throws IOException
        Copy an index file from specified sourceRepo to the destination directory (i.e. restore).
        Parameters:
        sourceDir - The source URI hosting the file to be copied.
        dest - The destination where the file should be copied.
        Throws:
        IOException - in case of errors.
      • close

        public void close()