Package io.fathom.cloud.protobuf.CloudCommons

Examples of io.fathom.cloud.protobuf.CloudCommons.PeerRequest


    private void flushPeerRequests() {
        for (Entry<StorageNode, PeerRequest.Builder> entry : peerRequests.entrySet()) {
            StorageNode node = entry.getKey();
            PeerRequest.Builder prb = entry.getValue();

            PeerRequest pr = prb.build();

            try {
                node.requestExecutor.execute(pr.toByteArray());
            } catch (IOException e) {
                log.error("Error enqueuing peer request", e);
            }
        }
        peerRequests.clear();
View Full Code Here


    @Override
    public void execute(byte[] bytes) throws IOException {
        // TODO: Use injection to make this cleaner??

        PeerRequest pr = PeerRequest.parseFrom(bytes);

        if (pr.getFixReplicaCount() != 0) {
            for (FixReplica fr : pr.getFixReplicaList()) {
                ReplicaRepair repair = new ReplicaRepair(replicatedBlobStore.getCluster(), fr.getBlobStoreKey());

                // TODO: Run in parallel??
                for (ByteString blobKey : fr.getBlobKeyList()) {
                    repair.fixReplicate(replicatedBlobStore, localBlobStore, blobKey);
View Full Code Here

TOP

Related Classes of io.fathom.cloud.protobuf.CloudCommons.PeerRequest

Copyright © 2018 www.massapicom. 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.