public ReplicationDiagnostics checkIfReplicationComplete(Pair<SolrCore,SolrCore> request,long totalTime,long maxTime) throws Exception {
  String coreName=request.getLhs().name;
  String hostName=request.getLhs().host;
  ReplicationDiagnostics diagnostics=SolrInteractionUtils.checkReplicationStatus(hostName,coreName);
  while ((diagnostics.isReplicating()) && (totalTime < maxTime)) {
    logger.info("Core " + coreName + " is still replication.. Waiting for 2 seconds before checking the status again...");
    diagnostics=SolrInteractionUtils.checkReplicationStatus(hostName,coreName);
    logger.info("Waiting for: " + diagnostics.getEntity() + " "+ diagnostics.getPercentageComplete());
    Thread.sleep(SolrInteractionUtils.DEFAULT_SLEEP_TIME);
    totalTime+=2000;
    diagnostics=SolrInteractionUtils.checkReplicationStatus(hostName,coreName);
  }
  logger.info("Core " + coreName + " has completed Replication. Moving onto core health checks for "+ coreName);
  return diagnostics;
}

public ReplicationDiagnostics checkIfReplicationComplete ( Pair < SolrCore , SolrCore > request , long totalTime , long maxTime ) throws Exception { String coreName = request . getLhs ( ) . name ; String hostName = request . getLhs ( ) . host ; ReplicationDiagnostics diagnostics = SolrInteractionUtils . checkReplicationStatus ( hostName , coreName ) ; while ( ( diagnostics . isReplicating ( ) ) && ( totalTime < maxTime ) ) { logger . info ( "Core " + coreName + " is still replication.. Waiting for 2 seconds before checking the status again..." ) ; diagnostics = SolrInteractionUtils . checkReplicationStatus ( hostName , coreName ) ; logger . info ( "Waiting for: " + diagnostics . getEntity ( ) + " " + diagnostics . getPercentageComplete ( ) ) ; Thread . sleep ( SolrInteractionUtils . DEFAULT_SLEEP_TIME ) ; totalTime += 2000 ; diagnostics = SolrInteractionUtils . checkReplicationStatus ( hostName , coreName ) ; } logger . info ( "Core " + coreName + " has completed Replication. Moving onto core health checks for " + coreName ) ; return diagnostics ; }
given a replication request , check ( with retries ) if it is successful .
