private static void pushSchemaMutation(InetAddress endpoint, Collection<Mutation> schema) { MessageOut<Collection<Mutation>> msg = new MessageOut<>(MessagingService.Verb.DEFINITIONS_UPDATE, schema, MigrationsSerializer.instance); MessagingService.instance().sendOneWay(msg, endpoint); }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }
private static void pushSchemaMutation(InetAddress endpoint, Collection<Mutation> schema) { MessageOut<Collection<Mutation>> msg = new MessageOut<>(MessagingService.Verb.DEFINITIONS_UPDATE, schema, MigrationsSerializer.instance); MessagingService.instance().sendOneWay(msg, endpoint); }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }
/** * Unlike commitPaxos, this does not wait for replies */ private static void sendCommit(Commit commit, Iterable<InetAddress> replicas) { MessageOut<Commit> message = new MessageOut<Commit>(MessagingService.Verb.PAXOS_COMMIT, commit, Commit.serializer); for (InetAddress target : replicas) MessagingService.instance().sendOneWay(message, target); }
/** * If we succeeded on both stream in and out, reply back to coordinator */ public void onSuccess(StreamState state) { logger.info("[repair #{}] streaming task succeed, returning response to {}", desc.sessionId, request.initiator); MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, true).createMessage(), request.initiator); }
/** * If we succeeded on both stream in and out, reply back to coordinator */ public void onSuccess(StreamState state) { logger.info("[repair #{}] streaming task succeed, returning response to {}", desc.sessionId, request.initiator); MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, true).createMessage(), request.initiator); }
/** * Called when some error during the validation happened. * This sends RepairStatus to inform the initiator that the validation has failed. * The actual reason for failure should be looked up in the log of the host calling this function. */ public void fail() { logger.error("Failed creating a merkle tree for {}, {} (see log for details)", desc, initiator); // send fail message only to nodes >= version 2.0 MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator); }
/** * Called when some error during the validation happened. * This sends RepairStatus to inform the initiator that the validation has failed. * The actual reason for failure should be looked up in the log of the host calling this function. */ public void fail() { logger.error("Failed creating a merkle tree for {}, {} (see log for details)", desc, initiator); // send fail message only to nodes >= version 2.0 MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator); }
/** * Called when some error during the validation happened. * This sends RepairStatus to inform the initiator that the validation has failed. * The actual reason for failure should be looked up in the log of the host calling this function. */ public void fail() { logger.error("Failed creating a merkle tree for {}, {} (see log for details)", desc, initiator); // send fail message only to nodes >= version 2.0 MessagingService.instance().sendOneWay(new ValidationComplete(desc).createMessage(), initiator); }
protected void startSync(List<Range<Token>> differences) { InetAddress local = FBUtilities.getBroadcastAddress(); SyncRequest request = new SyncRequest(desc, local, r1.endpoint, r2.endpoint, differences); String message = String.format("Forwarding streaming repair of %d ranges to %s (to be streamed with %s)", request.ranges.size(), request.src, request.dst); logger.info("[repair #{}] {}", desc.sessionId, message); Tracing.traceRepair(message); MessagingService.instance().sendOneWay(request.createMessage(), request.src); }
protected void startSync(List<Range<Token>> differences) { InetAddress local = FBUtilities.getBroadcastAddress(); SyncRequest request = new SyncRequest(desc, local, r1.endpoint, r2.endpoint, differences); String message = String.format("Forwarding streaming repair of %d ranges to %s (to be streamed with %s)", request.ranges.size(), request.src, request.dst); logger.info("[repair #{}] {}", desc.sessionId, message); Tracing.traceRepair(message); MessagingService.instance().sendOneWay(request.createMessage(), request.src); }
/** * If we failed on either stream in or out, reply fail to coordinator */ public void onFailure(Throwable t) { MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator); } }
/** * If we failed on either stream in or out, reply fail to coordinator */ public void onFailure(Throwable t) { MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator); } }
private static void respondError(Truncation t, MessageIn truncateRequestMessage) { TruncateResponse response = new TruncateResponse(t.keyspace, t.columnFamily, false); MessagingService.instance().sendOneWay(response.createMessage(), truncateRequestMessage.from); } }
private static void respondError(Truncation t, MessageIn truncateRequestMessage) { TruncateResponse response = new TruncateResponse(t.keyspace, t.columnFamily, false); MessagingService.instance().sendOneWay(response.createMessage(), truncateRequestMessage.from); } }
/** * Send ValidationRequest to replica */ public void run() { ValidationRequest request = new ValidationRequest(desc, gcBefore); MessagingService.instance().sendOneWay(request.createMessage(), endpoint); }
/** * Send ValidationRequest to replica */ public void run() { ValidationRequest request = new ValidationRequest(desc, gcBefore); MessagingService.instance().sendOneWay(request.createMessage(), endpoint); }
/** * If we failed on either stream in or out, reply fail to coordinator */ public void onFailure(Throwable t) { MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, false).createMessage(), request.initiator); } }
@Override public void process(InetAddress endpoint) { ValidationRequest request = new ValidationRequest(desc, gcBefore); MessagingService.instance().sendOneWay(request.createMessage(), endpoint); } };