ResultToSolrMapper resultToSolrMapper = ResultToSolrMapperFactory.createResultToSolrMapper(
indexingSpec.getIndexerName(),
indexerConf);
Indexer indexer = Indexer.createIndexer(
indexingSpec.getIndexerName(),
indexerConf,
indexingSpec.getTableName(),
resultToSolrMapper,
null,
null,
documentWriter);
Scan scan = indexingOpts.getScans().get(0);
HTable htable = null;
try {
htable = new HTable(hbaseConf, indexingSpec.getTableName());
ResultScanner scanner = htable.getScanner(scan);
for (Result result : scanner) {
indexer.indexRowData(ImmutableList.<RowData>of(new ResultWrappingRowData(result,
indexingSpec.getTableName().getBytes(Charsets.UTF_8))));
}
} catch (Exception e) {
throw new RuntimeException(e);
} finally {