// Taken from org.apache.solr.hadoop.MapReduceIndexerTool
private void evaluateShards() {
if (zkHost != null) {
assert collection != null;
ForkedZooKeeperInspector zki = new ForkedZooKeeperInspector();
try {
shardUrls = zki.extractShardUrls(zkHost, collection);
} catch (Exception e) {
LOG.debug("Cannot extract SolrCloud shard URLs from ZooKeeper", e);
throw new RuntimeException("Cannot extract SolrCloud shard URLs from ZooKeeper", e);
}
assert shardUrls != null;