public boolean isGossipOnlyMember(InetAddress endpoint) { EndpointState epState = endpointStateMap.get(endpoint); if (epState == null) { return false; } return !isDeadState(epState) && !StorageService.instance.getTokenMetadata().isMember(endpoint); }
public boolean isGossipOnlyMember(InetAddress endpoint) { EndpointState epState = endpointStateMap.get(endpoint); if (epState == null) { return false; } return !isDeadState(epState) && !StorageService.instance.getTokenMetadata().isMember(endpoint); }
public boolean isGossipOnlyMember(InetAddress endpoint) { EndpointState epState = endpointStateMap.get(endpoint); if (epState == null) { return false; } return !isDeadState(epState) && !StorageService.instance.getTokenMetadata().isMember(endpoint); }
public boolean isAlive(InetAddress endpoint) { EndpointState epState = getEndpointStateForEndpoint(endpoint); if (epState == null) return false; return epState.isAlive() && !isDeadState(epState); }
public boolean isAlive(InetAddress endpoint) { EndpointState epState = getEndpointStateForEndpoint(endpoint); if (epState == null) return false; return epState.isAlive() && !isDeadState(epState); }
public void onChange(InetAddress endpoint, ApplicationState state, VersionedValue value) { if (preferLocal && state == ApplicationState.INTERNAL_IP && !Gossiper.instance.isDeadState(Gossiper.instance.getEndpointStateForEndpoint(endpoint))) reconnect(endpoint, value); }
public void onChange(InetAddress endpoint, ApplicationState state, VersionedValue value) { if (preferLocal && !Gossiper.instance.isDeadState(Gossiper.instance.getEndpointStateForEndpoint(endpoint)) && state == ApplicationState.INTERNAL_IP) reconnect(endpoint, value); }
public void onChange(InetAddress endpoint, ApplicationState state, VersionedValue value) { if (preferLocal && state == ApplicationState.INTERNAL_IP && !Gossiper.instance.isDeadState(Gossiper.instance.getEndpointStateForEndpoint(endpoint))) reconnect(endpoint, value); }
public boolean isAlive(InetAddress endpoint) { EndpointState epState = getEndpointStateForEndpoint(endpoint); if (epState == null) return false; return epState.isAlive() && !isDeadState(epState); }
/** * A fat client is a node that has not joined the ring, therefore acting as a coordinator only. * * @param endpoint - the endpoint to check * @return true if it is a fat client */ public boolean isFatClient(InetAddress endpoint) { EndpointState epState = endpointStateMap.get(endpoint); if (epState == null) { return false; } return !isDeadState(epState) && !StorageService.instance.getTokenMetadata().isMember(endpoint); }
public void onChange(InetAddress endpoint, ApplicationState state, VersionedValue value) { if (preferLocal && state == ApplicationState.INTERNAL_IP && !Gossiper.instance.isDeadState(Gossiper.instance.getEndpointStateForEndpoint(endpoint))) reconnect(endpoint, value); }
public Set<InetAddress> getLiveRingMembers(boolean excludeDeadStates) { Set<InetAddress> ret = new HashSet<>(); for (InetAddress ep : Gossiper.instance.getLiveMembers()) { if (excludeDeadStates) { EndpointState epState = Gossiper.instance.getEndpointStateForEndpoint(ep); if (epState == null || Gossiper.instance.isDeadState(epState)) continue; } if (tokenMetadata.isMember(ep)) ret.add(ep); } return ret; }
public Set<InetAddress> getLiveRingMembers(boolean excludeDeadStates) { Set<InetAddress> ret = new HashSet<>(); for (InetAddress ep : Gossiper.instance.getLiveMembers()) { if (excludeDeadStates) { EndpointState epState = Gossiper.instance.getEndpointStateForEndpoint(ep); if (epState == null || Gossiper.instance.isDeadState(epState)) continue; } if (tokenMetadata.isMember(ep)) ret.add(ep); } return ret; }
public Set<InetAddress> getLiveRingMembers(boolean excludeDeadStates) { Set<InetAddress> ret = new HashSet<>(); for (InetAddress ep : Gossiper.instance.getLiveMembers()) { if (excludeDeadStates) { EndpointState epState = Gossiper.instance.getEndpointStateForEndpoint(ep); if (epState == null || Gossiper.instance.isDeadState(epState)) continue; } if (tokenMetadata.isMember(ep)) ret.add(ep); } return ret; }
public Set<InetAddress> getLiveRingMembers(boolean excludeDeadStates) { Set<InetAddress> ret = new HashSet<>(); for (InetAddress ep : Gossiper.instance.getLiveMembers()) { if (excludeDeadStates) { EndpointState epState = Gossiper.instance.getEndpointStateForEndpoint(ep); if (epState == null || Gossiper.instance.isDeadState(epState)) continue; } if (tokenMetadata.isMember(ep)) ret.add(ep); } return ret; }
public void onJoin(InetAddress endpoint, EndpointState epState) { if (preferLocal && !Gossiper.instance.isDeadState(epState) && epState.getApplicationState(ApplicationState.INTERNAL_IP) != null) reconnect(endpoint, epState.getApplicationState(ApplicationState.INTERNAL_IP)); }
public void onJoin(InetAddress endpoint, EndpointState epState) { if (preferLocal && !Gossiper.instance.isDeadState(epState) && epState.getApplicationState(ApplicationState.INTERNAL_IP) != null) reconnect(endpoint, epState.getApplicationState(ApplicationState.INTERNAL_IP)); }
public void onJoin(InetAddress endpoint, EndpointState epState) { if (preferLocal && !Gossiper.instance.isDeadState(epState) && epState.getApplicationState(ApplicationState.INTERNAL_IP) != null) reconnect(endpoint, epState.getApplicationState(ApplicationState.INTERNAL_IP)); }
public void onJoin(InetAddress endpoint, EndpointState epState) { if (preferLocal && !Gossiper.instance.isDeadState(epState) && epState.getApplicationState(ApplicationState.INTERNAL_IP) != null) reconnect(endpoint, epState.getApplicationState(ApplicationState.INTERNAL_IP)); }
/** * Check if this endpoint can safely bootstrap into the cluster. * * @param endpoint - the endpoint to check * @return true if the endpoint can join the cluster */ public boolean isSafeForBootstrap(InetAddress endpoint) { EndpointState epState = endpointStateMap.get(endpoint); // if there's no previous state, or the node was previously removed from the cluster, we're good if (epState == null || isDeadState(epState)) return true; String status = getGossipStatus(epState); // these states are not allowed to join the cluster as it would not be safe final List<String> unsafeStatuses = new ArrayList<String>() {{ add(""); // failed bootstrap but we did start gossiping add(VersionedValue.STATUS_NORMAL); // node is legit in the cluster or it was stopped with kill -9 add(VersionedValue.SHUTDOWN); }}; // node was shutdown return !unsafeStatuses.contains(status); }