jsedding opened a new pull request, #3249:
URL: https://github.com/apache/jackrabbit-oak/pull/3249

   This PR introduces two new interfaces, 
`org.apache.jackrabbit.oak.segment.file.tar.IOReadAccess` and 
`org.apache.jackrabbit.oak.segment.file.tar.IOWriteAccess` (extends 
`IOReadAccess`).
   
   IO calls in `SegmentTarReader` and `SegmentTarWriter` are replaced with 
equivalent calls to `IOReadAccess` and `IOWriteAccess`. The existing 
filesystem-based functionality is preserved via the implementations 
`SegmentTarReader.FileIOReadAccess` and `SegmentTarWriter.FileIOWriteAccess` 
respectively.
   
   Up to here the change is intended to be purely behaviour-preserving 
refactoring.
   
   For "oak-segment-azure", a new `AzureTarArchiveManager` is implemented. It 
returns `SegmentTarReader` and `SegmentTarWriter` instances, backed by 
azure-based implementations of `IOReadAccess` and `IOWriteAccess`. By doing so, 
binary-identical TAR archives are written to the Azure blob-store using the 
same code-paths that are used for the filesystem-based implementation. The only 
difference is that the existing `AzureJournalFile` implementation is used; i.e. 
when moving the files between a filesystem and azure, it would be necessary to 
rename "journal.log" to "journal.log.001" or vice-versa.
   
   Finally, an `AzureHybridArchiveManager` is implemented. This delegates to 
the existing `AzureTarArchiveManager` or the new `AzureTarArchiveManager` as 
appropriate: i.e. for existing archives, it choses the reader implementation 
that can read the archive and for the writer it choses the configured 
archive-format, FOLDER or TAR_FILE. Thus, the `AzureHybridArchiveManager` 
allows an existing azure segmentstore to be switched over to the TAR_FILE 
format and all new archives will be written as TAR files.
   
   Until all archives are rewritten, e.g. due to compaction, it will happily 
read from the hybrid store. The switch works the same way in the other 
direction.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to