/** * Write a hint for all replicas. Used to re-dispatch hints whose destination is either missing or no longer correct. */ void writeForAllReplicas(Hint hint) { String keyspaceName = hint.mutation.getKeyspaceName(); Token token = hint.mutation.key().getToken(); Iterable<UUID> hostIds = transform(filter(StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token), StorageProxy::shouldHint), StorageService.instance::getHostIdForEndpoint); write(hostIds, hint); }
/** * Write a hint for all replicas. Used to re-dispatch hints whose destination is either missing or no longer correct. */ void writeForAllReplicas(Hint hint) { String keyspaceName = hint.mutation.getKeyspaceName(); Token token = hint.mutation.key().getToken(); Iterable<UUID> hostIds = transform(filter(StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token), StorageProxy::shouldHint), StorageService.instance::getHostIdForEndpoint); write(hostIds, hint); }
private static void hintMutation(Mutation mutation) { String keyspaceName = mutation.getKeyspaceName(); Token token = mutation.key().getToken(); Iterable<InetAddress> endpoints = StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token); ArrayList<InetAddress> endpointsToHint = new ArrayList<>(Iterables.size(endpoints)); // local writes can timeout, but cannot be dropped (see LocalMutationRunnable and CASSANDRA-6510), // so there is no need to hint or retry. for (InetAddress target : endpoints) if (!target.equals(FBUtilities.getBroadcastAddress()) && shouldHint(target)) endpointsToHint.add(target); submitHint(mutation, endpointsToHint, null); }
private static void hintMutation(Mutation mutation) { String keyspaceName = mutation.getKeyspaceName(); Token token = mutation.key().getToken(); Iterable<InetAddress> endpoints = StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token); ArrayList<InetAddress> endpointsToHint = new ArrayList<>(Iterables.size(endpoints)); // local writes can timeout, but cannot be dropped (see LocalMutationRunnable and CASSANDRA-6510), // so there is no need to hint or retry. for (InetAddress target : endpoints) if (!target.equals(FBUtilities.getBroadcastAddress()) && shouldHint(target)) endpointsToHint.add(target); submitHint(mutation, endpointsToHint, null); }
private static void hintMutation(Mutation mutation) { String keyspaceName = mutation.getKeyspaceName(); Token token = mutation.key().getToken(); Iterable<InetAddress> endpoints = StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token); ArrayList<InetAddress> endpointsToHint = new ArrayList<>(Iterables.size(endpoints)); // local writes can timeout, but cannot be dropped (see LocalMutationRunnable and CASSANDRA-6510), // so there is no need to hint or retry. for (InetAddress target : endpoints) if (!target.equals(FBUtilities.getBroadcastAddress()) && shouldHint(target)) endpointsToHint.add(target); submitHint(mutation, endpointsToHint, null); }
/** * Write a hint for all replicas. Used to re-dispatch hints whose destination is either missing or no longer correct. */ void writeForAllReplicas(Hint hint) { String keyspaceName = hint.mutation.getKeyspaceName(); Token token = hint.mutation.key().getToken(); Iterable<UUID> hostIds = transform(filter(StorageService.instance.getNaturalAndPendingEndpoints(keyspaceName, token), StorageProxy::shouldHint), StorageService.instance::getHostIdForEndpoint); write(hostIds, hint); }
Token tk = mutation.key().getToken(); for (InetAddress endpoint : StorageService.instance.getNaturalAndPendingEndpoints(ks, tk))
Token tk = mutation.key().getToken(); for (InetAddress endpoint : StorageService.instance.getNaturalAndPendingEndpoints(ks, tk))
Token tk = mutation.key().getToken(); for (InetAddress endpoint : StorageService.instance.getNaturalAndPendingEndpoints(ks, tk))