Search in sources :

Example 11 with InvalidFileStoreVersionException

use of org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException in project jackrabbit-oak by apache.

the class SegmentTarNodeStoreContainer method open.

@Override
public NodeStore open() throws IOException {
    directory.mkdirs();
    FileStoreBuilder builder = fileStoreBuilder(new File(directory, "segmentstore"));
    if (blob != null) {
        builder.withBlobStore(blob.open());
    }
    try {
        fs = builder.build();
    } catch (InvalidFileStoreVersionException e) {
        throw new IllegalStateException(e);
    }
    return SegmentNodeStoreBuilders.builder(fs).build();
}
Also used : FileStoreBuilder(org.apache.jackrabbit.oak.segment.file.FileStoreBuilder) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) File(java.io.File)

Example 12 with InvalidFileStoreVersionException

use of org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException in project jackrabbit-oak by apache.

the class Registrations method registerSegmentStore.

/**
     * Configures and registers a new SegmentNodeStore instance together will
     * all required components. Anything that must be disposed of (like
     * registered services or MBeans) will be registered via the
     * {@code registration} parameter.
     *
     * @param context            An instance of {@link ComponentContext}.
     * @param blobStore          An instance of {@link BlobStore}. It can be
     *                           {@code null}.
     * @param statisticsProvider An instance of {@link StatisticsProvider}.
     * @param closer             An instance of {@link Closer}. It will be used
     *                           to track every registered service or
     *                           component.
     * @param whiteboard         An instance of {@link Whiteboard}. It will be
     *                           used to register services in the OSGi
     *                           framework.
     * @param role               The role of this component. It can be {@code
     *                           null}.
     * @param descriptors        Determines if repository descriptors related to
     *                           discovery services should be registered.
     * @return A configured {@link SegmentNodeStore}, or {@code null} if the
     * setup failed.
     * @throws IOException In case an unrecoverable error occurs.
     */
static SegmentNodeStore registerSegmentStore(@Nonnull ComponentContext context, @Nullable BlobStore blobStore, @Nonnull StatisticsProvider statisticsProvider, @Nonnull Closer closer, @Nonnull Whiteboard whiteboard, @Nullable String role, boolean descriptors) throws IOException {
    Configuration configuration = new Configuration(context, role);
    Closeables closeables = new Closeables(closer);
    Registrations registrations = new Registrations(whiteboard, role);
    // Listen for GCMonitor services
    GCMonitor gcMonitor = GCMonitor.EMPTY;
    if (configuration.isPrimarySegmentStore()) {
        GCMonitorTracker tracker = new GCMonitorTracker();
        tracker.start(whiteboard);
        closeables.add(tracker);
        gcMonitor = tracker;
    }
    // Create the gc options
    if (configuration.getCompactionGainThreshold() != null) {
        log.warn("Detected deprecated flag 'compaction.gainThreshold'. " + "Please use 'compaction.sizeDeltaEstimation' instead and " + "'compaction.disableEstimation' to disable estimation.");
    }
    SegmentGCOptions gcOptions = new SegmentGCOptions(configuration.getPauseCompaction(), configuration.getRetryCount(), configuration.getForceCompactionTimeout()).setRetainedGenerations(configuration.getRetainedGenerations()).setGcSizeDeltaEstimation(configuration.getSizeDeltaEstimation()).setMemoryThreshold(configuration.getMemoryThreshold()).setEstimationDisabled(configuration.getDisableEstimation()).withGCNodeWriteMonitor(configuration.getGCProcessLog());
    // Build the FileStore
    FileStoreBuilder builder = fileStoreBuilder(configuration.getSegmentDirectory()).withSegmentCacheSize(configuration.getSegmentCacheSize()).withStringCacheSize(configuration.getStringCacheSize()).withTemplateCacheSize(configuration.getTemplateCacheSize()).withStringDeduplicationCacheSize(configuration.getStringDeduplicationCacheSize()).withTemplateDeduplicationCacheSize(configuration.getTemplateDeduplicationCacheSize()).withNodeDeduplicationCacheSize(configuration.getNodeDeduplicationCacheSize()).withMaxFileSize(configuration.getMaxFileSize()).withMemoryMapping(configuration.getMemoryMapping()).withGCMonitor(gcMonitor).withIOMonitor(new MetricsIOMonitor(statisticsProvider)).withStatisticsProvider(statisticsProvider).withGCOptions(gcOptions);
    if (configuration.hasCustomBlobStore() && blobStore != null) {
        log.info("Initializing SegmentNodeStore with BlobStore [{}]", blobStore);
        builder.withBlobStore(blobStore);
    }
    if (configuration.isStandbyInstance()) {
        builder.withSnfeListener(IGNORE_SNFE);
    }
    final FileStore store;
    try {
        store = builder.build();
    } catch (InvalidFileStoreVersionException e) {
        log.error("The storage format is not compatible with this version of Oak Segment Tar", e);
        return null;
    }
    // store should be closed last
    closeables.add(store);
    // Listen for Executor services on the whiteboard
    WhiteboardExecutor executor = new WhiteboardExecutor();
    executor.start(whiteboard);
    closeables.add(executor);
    // Expose stats about the segment cache
    CacheStatsMBean segmentCacheStats = store.getSegmentCacheStats();
    closeables.add(registrations.registerMBean(CacheStatsMBean.class, segmentCacheStats, CacheStats.TYPE, segmentCacheStats.getName()));
    // Expose stats about the string and template caches
    CacheStatsMBean stringCacheStats = store.getStringCacheStats();
    closeables.add(registrations.registerMBean(CacheStatsMBean.class, stringCacheStats, CacheStats.TYPE, stringCacheStats.getName()));
    CacheStatsMBean templateCacheStats = store.getTemplateCacheStats();
    closeables.add(registrations.registerMBean(CacheStatsMBean.class, templateCacheStats, CacheStats.TYPE, templateCacheStats.getName()));
    WriterCacheManager cacheManager = builder.getCacheManager();
    CacheStatsMBean stringDeduplicationCacheStats = cacheManager.getStringCacheStats();
    if (stringDeduplicationCacheStats != null) {
        closeables.add(registrations.registerMBean(CacheStatsMBean.class, stringDeduplicationCacheStats, CacheStats.TYPE, stringDeduplicationCacheStats.getName()));
    }
    CacheStatsMBean templateDeduplicationCacheStats = cacheManager.getTemplateCacheStats();
    if (templateDeduplicationCacheStats != null) {
        closeables.add(registrations.registerMBean(CacheStatsMBean.class, templateDeduplicationCacheStats, CacheStats.TYPE, templateDeduplicationCacheStats.getName()));
    }
    CacheStatsMBean nodeDeduplicationCacheStats = cacheManager.getNodeCacheStats();
    if (nodeDeduplicationCacheStats != null) {
        closeables.add(registrations.registerMBean(CacheStatsMBean.class, nodeDeduplicationCacheStats, CacheStats.TYPE, nodeDeduplicationCacheStats.getName()));
    }
    if (configuration.isPrimarySegmentStore()) {
        final FileStoreGCMonitor monitor = new FileStoreGCMonitor(Clock.SIMPLE);
        closeables.add(registrations.register(GCMonitor.class, monitor));
        if (!configuration.isStandbyInstance()) {
            closeables.add(registrations.registerMBean(SegmentRevisionGC.class, new SegmentRevisionGCMBean(store, gcOptions, monitor), SegmentRevisionGC.TYPE, "Segment node store revision garbage collection"));
        }
        Runnable cancelGC = new Runnable() {

            @Override
            public void run() {
                store.cancelGC();
            }
        };
        Supplier<String> statusMessage = new Supplier<String>() {

            @Override
            public String get() {
                return monitor.getStatus();
            }
        };
        closeables.add(registrations.registerMBean(RevisionGCMBean.class, new RevisionGC(store.getGCRunner(), cancelGC, statusMessage, executor), RevisionGCMBean.TYPE, "Revision garbage collection"));
    }
    // Expose statistics about the FileStore
    closeables.add(registrations.registerMBean(FileStoreStatsMBean.class, store.getStats(), FileStoreStatsMBean.TYPE, "FileStore statistics"));
    // register segment node store
    SegmentNodeStore.SegmentNodeStoreBuilder segmentNodeStoreBuilder = SegmentNodeStoreBuilders.builder(store).withStatisticsProvider(statisticsProvider);
    if (configuration.isStandbyInstance() || !configuration.isPrimarySegmentStore()) {
        segmentNodeStoreBuilder.dispatchChanges(false);
    }
    SegmentNodeStore segmentNodeStore = segmentNodeStoreBuilder.build();
    if (configuration.isPrimarySegmentStore()) {
        ObserverTracker observerTracker = new ObserverTracker(segmentNodeStore);
        observerTracker.start(context.getBundleContext());
        closeables.add(observerTracker);
    }
    if (configuration.isPrimarySegmentStore()) {
        closeables.add(registrations.registerMBean(CheckpointMBean.class, new SegmentCheckpointMBean(segmentNodeStore), CheckpointMBean.TYPE, "Segment node store checkpoint management"));
    }
    if (descriptors) {
        // ensure a clusterId is initialized
        // and expose it as 'oak.clusterid' repository descriptor
        GenericDescriptors clusterIdDesc = new GenericDescriptors();
        clusterIdDesc.put(ClusterRepositoryInfo.OAK_CLUSTERID_REPOSITORY_DESCRIPTOR_KEY, new SimpleValueFactory().createValue(getOrCreateId(segmentNodeStore)), true, false);
        closeables.add(registrations.register(Descriptors.class, clusterIdDesc));
        // Register "discovery lite" descriptors
        closeables.add(registrations.register(Descriptors.class, new SegmentDiscoveryLiteDescriptors(segmentNodeStore)));
    }
    // If a shared data store register the repo id in the data store
    if (configuration.isPrimarySegmentStore() && isShared(blobStore)) {
        SharedDataStore sharedDataStore = (SharedDataStore) blobStore;
        try {
            sharedDataStore.addMetadataRecord(new ByteArrayInputStream(new byte[0]), SharedStoreRecordType.REPOSITORY.getNameFromId(getOrCreateId(segmentNodeStore)));
        } catch (Exception e) {
            throw new IOException("Could not register a unique repositoryId", e);
        }
        if (blobStore instanceof BlobTrackingStore) {
            BlobTrackingStore trackingStore = (BlobTrackingStore) blobStore;
            if (trackingStore.getTracker() != null) {
                trackingStore.getTracker().close();
            }
            trackingStore.addTracker(new BlobIdTracker(configuration.getRepositoryHome(), getOrCreateId(segmentNodeStore), configuration.getBlobSnapshotInterval(), sharedDataStore));
        }
    }
    if (configuration.isPrimarySegmentStore() && blobStore instanceof GarbageCollectableBlobStore) {
        BlobGarbageCollector gc = new MarkSweepGarbageCollector(new SegmentBlobReferenceRetriever(store), (GarbageCollectableBlobStore) blobStore, executor, TimeUnit.SECONDS.toMillis(configuration.getBlobGcMaxAge()), getOrCreateId(segmentNodeStore));
        closeables.add(registrations.registerMBean(BlobGCMBean.class, new BlobGC(gc, executor), BlobGCMBean.TYPE, "Segment node store blob garbage collection"));
    }
    // Expose an MBean for backup/restore operations
    closeables.add(registrations.registerMBean(FileStoreBackupRestoreMBean.class, new FileStoreBackupRestoreImpl(segmentNodeStore, store.getRevisions(), store.getReader(), configuration.getBackupDirectory(), executor), FileStoreBackupRestoreMBean.TYPE, "Segment node store backup/restore"));
    // Expose statistics about the SegmentNodeStore
    closeables.add(registrations.registerMBean(SegmentNodeStoreStatsMBean.class, segmentNodeStore.getStats(), SegmentNodeStoreStatsMBean.TYPE, "SegmentNodeStore statistics"));
    if (configuration.isPrimarySegmentStore()) {
        log.info("Primary SegmentNodeStore initialized");
    } else {
        log.info("Secondary SegmentNodeStore initialized, role={}", role);
    }
    // Register a factory service to expose the FileStore
    closeables.add(registrations.register(SegmentStoreProvider.class, new DefaultSegmentStoreProvider(store)));
    if (configuration.isStandbyInstance()) {
        return segmentNodeStore;
    }
    if (configuration.isPrimarySegmentStore()) {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(Constants.SERVICE_PID, SegmentNodeStore.class.getName());
        props.put("oak.nodestore.description", new String[] { "nodeStoreType=segment" });
        closeables.add(registrations.register(NodeStore.class, segmentNodeStore, props));
    }
    return segmentNodeStore;
}
Also used : HashMap(java.util.HashMap) FileStoreBackupRestoreImpl(org.apache.jackrabbit.oak.backup.impl.FileStoreBackupRestoreImpl) GCMonitor(org.apache.jackrabbit.oak.spi.gc.GCMonitor) FileStoreGCMonitor(org.apache.jackrabbit.oak.segment.file.FileStoreGCMonitor) CheckpointMBean(org.apache.jackrabbit.oak.api.jmx.CheckpointMBean) SegmentRevisionGCMBean(org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGCMBean) GarbageCollectableBlobStore(org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore) BlobGC(org.apache.jackrabbit.oak.plugins.blob.BlobGC) SegmentRevisionGC(org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGC) FileStoreStatsMBean(org.apache.jackrabbit.oak.segment.file.FileStoreStatsMBean) GCMonitorTracker(org.apache.jackrabbit.oak.spi.gc.GCMonitorTracker) GenericDescriptors(org.apache.jackrabbit.oak.spi.descriptors.GenericDescriptors) SimpleValueFactory(org.apache.jackrabbit.commons.SimpleValueFactory) FileStoreBuilder(org.apache.jackrabbit.oak.segment.file.FileStoreBuilder) ByteArrayInputStream(java.io.ByteArrayInputStream) BlobGCMBean(org.apache.jackrabbit.oak.plugins.blob.BlobGCMBean) RevisionGCMBean(org.apache.jackrabbit.oak.spi.state.RevisionGCMBean) SegmentRevisionGCMBean(org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGCMBean) ObserverTracker(org.apache.jackrabbit.oak.spi.commit.ObserverTracker) SegmentGCOptions(org.apache.jackrabbit.oak.segment.compaction.SegmentGCOptions) FileStoreGCMonitor(org.apache.jackrabbit.oak.segment.file.FileStoreGCMonitor) WhiteboardExecutor(org.apache.jackrabbit.oak.spi.whiteboard.WhiteboardExecutor) NodeStore(org.apache.jackrabbit.oak.spi.state.NodeStore) BlobTrackingStore(org.apache.jackrabbit.oak.plugins.blob.BlobTrackingStore) Supplier(com.google.common.base.Supplier) GenericDescriptors(org.apache.jackrabbit.oak.spi.descriptors.GenericDescriptors) Descriptors(org.apache.jackrabbit.oak.api.Descriptors) SharedDataStore(org.apache.jackrabbit.oak.plugins.blob.SharedDataStore) BlobGarbageCollector(org.apache.jackrabbit.oak.plugins.blob.BlobGarbageCollector) IOException(java.io.IOException) FileStoreBackupRestoreMBean(org.apache.jackrabbit.oak.api.jmx.FileStoreBackupRestoreMBean) IOException(java.io.IOException) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) MetricsIOMonitor(org.apache.jackrabbit.oak.segment.file.MetricsIOMonitor) RevisionGC(org.apache.jackrabbit.oak.spi.state.RevisionGC) SegmentRevisionGC(org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGC) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) BlobIdTracker(org.apache.jackrabbit.oak.plugins.blob.datastore.BlobIdTracker) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) CacheStatsMBean(org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean) MarkSweepGarbageCollector(org.apache.jackrabbit.oak.plugins.blob.MarkSweepGarbageCollector)

Example 13 with InvalidFileStoreVersionException

use of org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException in project jackrabbit-oak by apache.

the class SegmentAzureFixture method createNodeStore.

@Override
public NodeStore createNodeStore() {
    AzurePersistence persistence;
    CloudBlobContainer container;
    try {
        CloudStorageAccount cloud = CloudStorageAccount.parse(AZURE_CONNECTION_STRING);
        int i = 1;
        while (true) {
            String containerName;
            if (i == 1) {
                containerName = AZURE_CONTAINER;
            } else {
                containerName = AZURE_CONTAINER + "_" + i;
            }
            container = cloud.createCloudBlobClient().getContainerReference(containerName);
            if (!container.exists()) {
                container.create();
                break;
            }
            i++;
        }
        CloudBlobDirectory directory = container.getDirectoryReference(AZURE_ROOT_PATH);
        persistence = new AzurePersistence(directory);
    } catch (StorageException | URISyntaxException | InvalidKeyException e) {
        throw new RuntimeException(e);
    }
    try {
        FileStore fileStore = FileStoreBuilder.fileStoreBuilder(Files.createTempDir()).withCustomPersistence(persistence).build();
        NodeStore nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build();
        fileStoreMap.put(nodeStore, fileStore);
        containerMap.put(nodeStore, container);
        return nodeStore;
    } catch (IOException | InvalidFileStoreVersionException e) {
        throw new RuntimeException(e);
    }
}
Also used : AzurePersistence(org.apache.jackrabbit.oak.segment.azure.AzurePersistence) CloudStorageAccount(com.microsoft.azure.storage.CloudStorageAccount) CloudBlobDirectory(com.microsoft.azure.storage.blob.CloudBlobDirectory) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) InvalidKeyException(java.security.InvalidKeyException) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) NodeStore(org.apache.jackrabbit.oak.spi.state.NodeStore) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) CloudBlobContainer(com.microsoft.azure.storage.blob.CloudBlobContainer) StorageException(com.microsoft.azure.storage.StorageException)

Example 14 with InvalidFileStoreVersionException

use of org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException in project jackrabbit-oak by apache.

the class IOTracerRunner method collectBreadthFirstTrace.

public void collectBreadthFirstTrace(@Nonnull String segmentStore, boolean mmap, int segmentCacheSize, @Nonnull String path, int depth, @Nonnull String output) throws IOException, InvalidFileStoreVersionException {
    checkNotNull(segmentStore);
    checkNotNull(path);
    checkNotNull(output);
    try (PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(output, true)))) {
        Function<IOMonitor, FileStore> factory = ioMonitor -> newFileStore(fileStoreBuilder(new File(segmentStore)).withMemoryMapping(mmap).withSegmentCacheSize(segmentCacheSize).withIOMonitor(ioMonitor));
        IOTracer ioTracer = newIOTracer(factory, out, BreadthFirstTrace.CONTEXT_SPEC);
        ioTracer.collectTrace(new BreadthFirstTrace(depth, path, ioTracer::setContext));
    }
}
Also used : PrintWriter(java.io.PrintWriter) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) IOMonitor(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor) IOMonitorAdapter(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter) BufferedWriter(java.io.BufferedWriter) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) FileWriter(java.io.FileWriter) FileStoreBuilder(org.apache.jackrabbit.oak.segment.file.FileStoreBuilder) IOException(java.io.IOException) Test(org.junit.Test) FileStoreBuilder.fileStoreBuilder(org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.fileStoreBuilder) Function(java.util.function.Function) String.format(java.lang.String.format) File(java.io.File) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) Boolean.parseBoolean(java.lang.Boolean.parseBoolean) IOTracer.newIOTracer(org.apache.jackrabbit.oak.segment.tool.iotrace.IOTracer.newIOTracer) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) System.getProperty(java.lang.System.getProperty) Integer.getInteger(java.lang.Integer.getInteger) Assume.assumeTrue(org.junit.Assume.assumeTrue) Nonnull(javax.annotation.Nonnull) Before(org.junit.Before) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) FileWriter(java.io.FileWriter) IOMonitor(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor) File(java.io.File) IOTracer.newIOTracer(org.apache.jackrabbit.oak.segment.tool.iotrace.IOTracer.newIOTracer) PrintWriter(java.io.PrintWriter) BufferedWriter(java.io.BufferedWriter)

Example 15 with InvalidFileStoreVersionException

use of org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException in project jackrabbit-oak by apache.

the class IOTracerTest method collectDepthFirstTrace.

@Test
public void collectDepthFirstTrace() throws IOException, InvalidFileStoreVersionException {
    try (StringWriter out = new StringWriter()) {
        Function<IOMonitor, FileStore> factory = this::createFileStore;
        IOTracer ioTracer = newIOTracer(factory, out, DepthFirstTrace.CONTEXT_SPEC);
        ioTracer.collectTrace(new DepthFirstTrace(2, "/", ioTracer::setContext));
        try (BufferedReader reader = new BufferedReader(new StringReader(out.toString()))) {
            Optional<String> header = reader.lines().findFirst();
            List<String[]> entries = reader.lines().map(line -> line.split(",")).collect(toList());
            assertTrue(header.isPresent());
            assertEquals("timestamp,file,segmentId,length,elapsed,depth,count,path", header.get());
            long now = currentTimeMillis();
            assertTrue("The timestamps of all entries must be in the past", entries.stream().map(// ts
            row -> parseLong(row[0])).allMatch(ts -> ts <= now));
            assertEquals("Expected depths 0 and 1", ImmutableSet.of(0, 1), entries.stream().map(// depth
            row -> parseInt(row[5])).distinct().collect(toSet()));
            assertEquals("Expected max 10 nodes", Optional.of(true), entries.stream().map(// count
            row -> parseInt(row[6])).max(Comparator.naturalOrder()).map(max -> max <= 10));
        }
    }
}
Also used : IOMonitor(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor) IOMonitorAdapter(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter) System.currentTimeMillis(java.lang.System.currentTimeMillis) FileStoreBuilder.fileStoreBuilder(org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.fileStoreBuilder) Function(java.util.function.Function) SegmentNodeBuilder(org.apache.jackrabbit.oak.segment.SegmentNodeBuilder) IOTracer.newIOTracer(org.apache.jackrabbit.oak.segment.tool.iotrace.IOTracer.newIOTracer) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) Nonnull(javax.annotation.Nonnull) Collectors.toSet(java.util.stream.Collectors.toSet) Before(org.junit.Before) SegmentNodeState(org.apache.jackrabbit.oak.segment.SegmentNodeState) InvalidFileStoreVersionException(org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException) ImmutableSet(com.google.common.collect.ImmutableSet) NodeBuilder(org.apache.jackrabbit.oak.spi.state.NodeBuilder) StringWriter(java.io.StringWriter) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) Integer.parseInt(java.lang.Integer.parseInt) File(java.io.File) Collectors.toList(java.util.stream.Collectors.toList) List(java.util.List) Rule(org.junit.Rule) StringReader(java.io.StringReader) Optional(java.util.Optional) BufferedReader(java.io.BufferedReader) Long.parseLong(java.lang.Long.parseLong) Comparator(java.util.Comparator) Assert.assertEquals(org.junit.Assert.assertEquals) TemporaryFolder(org.junit.rules.TemporaryFolder) FileStore(org.apache.jackrabbit.oak.segment.file.FileStore) StringWriter(java.io.StringWriter) BufferedReader(java.io.BufferedReader) StringReader(java.io.StringReader) IOMonitor(org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor) IOTracer.newIOTracer(org.apache.jackrabbit.oak.segment.tool.iotrace.IOTracer.newIOTracer) Test(org.junit.Test)

Aggregations

InvalidFileStoreVersionException (org.apache.jackrabbit.oak.segment.file.InvalidFileStoreVersionException)19 IOException (java.io.IOException)13 File (java.io.File)11 FileStore (org.apache.jackrabbit.oak.segment.file.FileStore)11 FileStoreBuilder (org.apache.jackrabbit.oak.segment.file.FileStoreBuilder)9 FileStoreBuilder.fileStoreBuilder (org.apache.jackrabbit.oak.segment.file.FileStoreBuilder.fileStoreBuilder)5 IOMonitorAdapter (org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitorAdapter)5 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)5 Function (java.util.function.Function)4 Nonnull (javax.annotation.Nonnull)4 HashMap (java.util.HashMap)3 List (java.util.List)3 IOMonitor (org.apache.jackrabbit.oak.segment.spi.monitor.IOMonitor)3 IOTracer.newIOTracer (org.apache.jackrabbit.oak.segment.tool.iotrace.IOTracer.newIOTracer)3 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)3 Before (org.junit.Before)3 Test (org.junit.Test)3 Preconditions.checkArgument (com.google.common.base.Preconditions.checkArgument)2 Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)2 Supplier (com.google.common.base.Supplier)2