Examples of FsTranslog


Examples of org.elasticsearch.index.translog.fs.FsTranslog

        store.deleteContent();

        ThreadPool threadPool = new ThreadPool();
        SnapshotDeletionPolicy deletionPolicy = new SnapshotDeletionPolicy(new KeepOnlyLastDeletionPolicy(shardId, settings));
        Engine engine = new RobinEngine(shardId, settings, new ThreadPool(), new IndexSettingsService(shardId.index(), settings), store, deletionPolicy, new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog")), new LogByteSizeMergePolicyProvider(store, new IndexSettingsService(shardId.index(), EMPTY_SETTINGS)),
                new ConcurrentMergeSchedulerProvider(shardId, settings), new AnalysisService(shardId.index()), new SimilarityService(shardId.index()), new NoneBloomCache(shardId.index()));
        engine.start();

        SimpleEngineBenchmark benchmark = new SimpleEngineBenchmark(store, engine)
                .numberOfContentItems(1000)
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

    protected Store createStoreReplica() throws IOException {
        return new RamStore(shardId, EMPTY_SETTINGS, null);
    }

    protected Translog createTranslog() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/primary"));
    }
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

    protected Translog createTranslog() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/primary"));
    }

    protected Translog createTranslogReplica() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/replica"));
    }
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

            recoveryStatus.translog().time(System.currentTimeMillis() - recoveryStatus.index().startTime());
            return;
        }

        // move an existing translog, if exists, to "recovering" state, and start reading from it
        FsTranslog translog = (FsTranslog) indexShard.translog();
        File recoveringTranslogFile = new File(translog.location(), "translog-" + translogId + ".recovering");
        if (!recoveringTranslogFile.exists()) {
            File translogFile = new File(translog.location(), "translog-" + translogId);
            if (translogFile.exists()) {
                for (int i = 0; i < 3; i++) {
                    if (translogFile.renameTo(recoveringTranslogFile)) {
                        break;
                    }
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

        DirectoryService directoryService = new RamDirectoryService(shardId, EMPTY_SETTINGS);
        return new Store(shardId, EMPTY_SETTINGS, null, directoryService, new LeastUsedDistributor(directoryService));
    }

    protected Translog createTranslog() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/primary"));
    }
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

    protected Translog createTranslog() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/primary"));
    }

    protected Translog createTranslogReplica() {
        return new FsTranslog(shardId, EMPTY_SETTINGS, new File("work/fs-translog/replica"));
    }
View Full Code Here

Examples of org.elasticsearch.index.translog.fs.FsTranslog

                recoveryState.getStart().checkIndexTime(indexShard.checkIndexTook());
                return;
            }

            // move an existing translog, if exists, to "recovering" state, and start reading from it
            FsTranslog translog = (FsTranslog) indexShard.translog();
            String translogName = "translog-" + translogId;
            String recoverTranslogName = translogName + ".recovering";


            File recoveringTranslogFile = null;
            for (File translogLocation : translog.locations()) {
                File tmpRecoveringFile = new File(translogLocation, recoverTranslogName);
                if (!tmpRecoveringFile.exists()) {
                    File tmpTranslogFile = new File(translogLocation, translogName);
                    if (tmpTranslogFile.exists()) {
                        for (int i = 0; i < RECOVERY_TRANSLOG_RENAME_RETRIES; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.