Search in sources :

Example 1 with AzureJournalFile

use of org.apache.jackrabbit.oak.segment.azure.AzureJournalFile in project jackrabbit-oak by apache.

the class AzureJournalReaderTest method createJournalReader.

protected JournalReader createJournalReader(String s) throws IOException {
    try {
        CloudAppendBlob blob = container.getAppendBlobReference("journal/journal.log.001");
        blob.createOrReplace();
        blob.appendText(s);
        return new JournalReader(new AzureJournalFile(container.getDirectoryReference("journal"), "journal.log"));
    } catch (StorageException | URISyntaxException e) {
        throw new IOException(e);
    }
}
Also used : CloudAppendBlob(com.microsoft.azure.storage.blob.CloudAppendBlob) AzureJournalFile(org.apache.jackrabbit.oak.segment.azure.AzureJournalFile) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) StorageException(com.microsoft.azure.storage.StorageException) JournalReader(org.apache.jackrabbit.oak.segment.file.JournalReader)

Aggregations

StorageException (com.microsoft.azure.storage.StorageException)1 CloudAppendBlob (com.microsoft.azure.storage.blob.CloudAppendBlob)1 IOException (java.io.IOException)1 URISyntaxException (java.net.URISyntaxException)1 AzureJournalFile (org.apache.jackrabbit.oak.segment.azure.AzureJournalFile)1 JournalReader (org.apache.jackrabbit.oak.segment.file.JournalReader)1