@Override public void executeAction() throws Exception { LinkedHashMap<String, String> destionationAliases = destinationZKClient.getZkClusterData().getAliases(); String destinationSolrHost = destinationZKClient.getZkClusterData().getSolrHosts().toArray()[0].toString(); String sourceSolrHost = sourceZKClient.getZkClusterData().getSolrHosts().toArray()[0].toString(); logger.info("Data Validity for the cluster...."); for (String alias : destionationAliases.keySet()) { int destinationSize = SolrInteractionUtils.fetchCollectionSize(alias, destinationSolrHost); int sourceSize = 0; try { sourceSize = SolrInteractionUtils.fetchCollectionSize(alias, sourceSolrHost); } catch (Exception e) { logger.info("Collection " + alias + "does not exist in source cluster..Skipping"); } if (destinationSize != sourceSize) { // Not throwing an exception, since it is just a smoke test report. The user can determine // what to do // with this information logger.info( "Collection " + alias + " has mismatching # of documents. Live has " + sourceSize + ". Dest has " + destinationSize); } } Collection<String> allCollections = destinationZKClient.getZkClusterData().getCollections(); destinationZKClient.fetchClusterHealth(allCollections); Set<SolrCore> coresStatus = destinationZKClient.getZkClusterData().getCluterCoresStatus(); logger.info("Health Check for the cluster..."); boolean isClusterHealthy = true; for (SolrCore individualCore : coresStatus) { if (!individualCore.available) { // Not throwing an exception, since it is just a smoke test report. The user can determine // what to do // with this information logger.info("Core " + individualCore + " is unavailable.."); isClusterHealthy = false; } } if (isClusterHealthy) { logger.info("Cluster is healthy..."); } }