final File file,
final String typeName,
final LocalFileIngestPlugin plugin,
final IngestRunData ingestRunData )
throws IOException {
final IndexWriter indexWriter = ingestRunData.getIndexWriter(accumulo.getIndex(plugin.getSupportedIndices()));
try (CloseableIterator<GeoWaveData<?>> geowaveDataIt = plugin.toGeoWaveData(
file,
indexWriter.getIndex().getId(),
accumulo.getVisibility())) {
while (geowaveDataIt.hasNext()) {
final GeoWaveData<?> geowaveData = geowaveDataIt.next();
final WritableDataAdapter adapter = ingestRunData.getDataAdapter(geowaveData);
if (adapter == null) {
LOGGER.warn("Adapter not found for " + geowaveData.getValue());
continue;
}
indexWriter.write(
adapter,
geowaveData.getValue());
}
}