public void check(){
  Response<Set<String>> serversResp=clusterService.listOnlineServers();
  if (!serversResp.isSuccess()) {
    Logs.error("failed to get all online servers, cause: {}",serversResp.getErr());
    return;
  }
  try {
    Set<String> allServers=serversResp.getData();
    final Set<String> failedServers=Sets.newHashSet();
    doCheck(allServers,failedServers);
    removeFailedServers(failedServers);
  }
 catch (  InterruptedException e) {
    Logs.error("failed to check online servers: {}",Throwables.getStackTraceAsString(e));
  }
}

public void check ( ) { Response < Set < String > > serversResp = clusterService . listOnlineServers ( ) ; if ( ! serversResp . isSuccess ( ) ) { Logs . error ( "failed to get all online servers, cause: {}" , serversResp . getErr ( ) ) ; return ; } try { Set < String > allServers = serversResp . getData ( ) ; final Set < String > failedServers = Sets . newHashSet ( ) ; doCheck ( allServers , failedServers ) ; removeFailedServers ( failedServers ) ; } catch ( InterruptedException e ) { Logs . error ( "failed to check online servers: {}" , Throwables . getStackTraceAsString ( e ) ) ; } }
check all online servers are health & remove dead online servers
