public void convict(InetAddress endpoint, double phi) {
      if (!endpoints.contains(endpoint)) return;

      // We want a higher confidence in the failure detection than usual because failing a repair
      // wrongly has a high cost.
      if (phi < 2 * DatabaseDescriptor.getPhiConvictThreshold()) return;

      // Though unlikely, it is possible to arrive here multiple time and we
      // want to avoid print an error message twice
      if (!isFailed.compareAndSet(false, true)) return;

      failedNode(endpoint);
    }
예제 #2
0
 public static boolean isLocalEndPoint(EndPoint ep) {
   return (endPoints_.contains(ep));
 }