Examples of readSnapshot()


Examples of com.netflix.zeno.fastblob.io.FastBlobReader.readSnapshot()

        FastBlobWriter writer = new FastBlobWriter(stateEngine);
        writer.writeSnapshot(new DataOutputStream(baos));

        FastBlobReader reader = new FastBlobReader(stateEngine);
        reader.readSnapshot(new ByteArrayInputStream(baos.toByteArray()));

        stateEngine.prepareForNextCycle();
     }
   
View Full Code Here

Examples of com.netflix.zeno.fastblob.io.FastBlobReader.readSnapshot()

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        FastBlobWriter writer = new FastBlobWriter(serverStateEngine, imageIndex);
        writer.writeSnapshot(baos);

        FastBlobReader reader = new FastBlobReader(clientStateEngine);
        reader.readSnapshot(new ByteArrayInputStream(baos.toByteArray()));
    }
}
View Full Code Here

Examples of com.netflix.zeno.fastblob.io.FastBlobReader.readSnapshot()

        stateEngine.prepareForWrite();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        FastBlobWriter writer = new FastBlobWriter(stateEngine, 0);
        writer.writeSnapshot(new DataOutputStream(baos));
        FastBlobReader reader = new FastBlobReader(stateEngine);
        reader.readSnapshot(new ByteArrayInputStream(baos.toByteArray()));
    }

    /**
     * This Integer serializer is deliberately unable to deserialize the value "2".
     *
 
View Full Code Here

Examples of org.elasticsearch.repositories.Repository.readSnapshot()

    public void restoreSnapshot(final RestoreRequest request, final RestoreSnapshotListener listener) {
        try {
            // Read snapshot info and metadata from the repository
            Repository repository = repositoriesService.repository(request.repository());
            final SnapshotId snapshotId = new SnapshotId(request.repository(), request.name());
            final Snapshot snapshot = repository.readSnapshot(snapshotId);
            ImmutableList<String> filteredIndices = SnapshotUtils.filterIndices(snapshot.indices(), request.indices(), request.indicesOptions());
            final MetaData metaData = repository.readSnapshotMetaData(snapshotId, filteredIndices);

            // Make sure that we can restore from this snapshot
            validateSnapshotRestorable(snapshotId, snapshot);
View Full Code Here

Examples of org.elasticsearch.repositories.Repository.readSnapshot()

    public ImmutableList<Snapshot> snapshots(String repositoryName) {
        ArrayList<Snapshot> snapshotList = newArrayList();
        Repository repository = repositoriesService.repository(repositoryName);
        ImmutableList<SnapshotId> snapshotIds = repository.snapshots();
        for (SnapshotId snapshotId : snapshotIds) {
            snapshotList.add(repository.readSnapshot(snapshotId));
        }
        CollectionUtil.timSort(snapshotList);
        return ImmutableList.copyOf(snapshotList);
    }
View Full Code Here

Examples of org.elasticsearch.repositories.Repository.readSnapshot()

     */
    public ImmutableMap<ShardId, IndexShardSnapshotStatus> snapshotShards(SnapshotId snapshotId) {
        ImmutableMap.Builder<ShardId, IndexShardSnapshotStatus> shardStatusBuilder = ImmutableMap.builder();
        Repository repository = repositoriesService.repository(snapshotId.getRepository());
        IndexShardRepository indexShardRepository = repositoriesService.indexShardRepository(snapshotId.getRepository());
        Snapshot snapshot = repository.readSnapshot(snapshotId);
        MetaData metaData = repository.readSnapshotMetaData(snapshotId, snapshot.indices());
        for (String index : snapshot.indices()) {
            IndexMetaData indexMetaData = metaData.indices().get(index);
            if (indexMetaData != null) {
                int numberOfShards = indexMetaData.getNumberOfShards();
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.