DirectSolrInputDocumentWriter writer = createCloudSolrWriter(context, indexConnectionParams);
solrDocWriter = wrapInBufferedWriter(context, writer);
return Indexer.createIndexer(indexName, indexerConf, tableName, mapper, null, null, solrDocWriter);
} else if (solrMode.equals("classic")) {
DirectSolrClassicInputDocumentWriter classicSolrWriter = createClassicSolrWriter(context, indexConnectionParams);
Sharder sharder = createSharder(indexConnectionParams, classicSolrWriter.getNumServers());
solrDocWriter = wrapInBufferedWriter(context, classicSolrWriter);
return Indexer.createIndexer(indexName, indexerConf, tableName, mapper, null, sharder, solrDocWriter);
} else {
throw new RuntimeException("Only 'cloud' and 'classic' are valid values for solr.mode, but got " + solrMode);
}