Package mil.nga.giat.geowave.store

Examples of mil.nga.giat.geowave.store.IndexWriter


        final GeoWaveOutputKey ingestKey,
        final Object object )
        throws IOException {
      final DataAdapter<?> adapter = adapterStore.getAdapter(ingestKey.getAdapterId());
      if (adapter instanceof WritableDataAdapter) {
        final IndexWriter indexWriter = getIndexWriter(ingestKey.getIndexId());
        if (indexWriter != null) {
          indexWriter.write(
              (WritableDataAdapter) adapter,
              object);
        }
        else {
          LOGGER.warn("Cannot write to index '" + StringUtils.stringFromBinary(ingestKey.getAdapterId().getBytes()) + "'");
View Full Code Here


    private synchronized IndexWriter getIndexWriter(
        final ByteArrayId indexId ) {
      if (!indexWriterCache.containsKey(indexId)) {
        final Index index = indexStore.getIndex(indexId);
        IndexWriter writer = null;
        if (index != null) {
          writer = dataStore.createIndexWriter(index);
        }
        else {
          LOGGER.warn("Index '" + StringUtils.stringFromBinary(indexId.getBytes()) + "' does not exist");
View Full Code Here

    return data.getAdapter(adapterCache);
  }

  public synchronized IndexWriter getIndexWriter(
      final Index index ) {
    IndexWriter indexWriter = indexIdToWriterCache.get(index.getId());
    if (indexWriter == null) {
      indexWriter = dataStore.createIndexWriter(index);
      indexIdToWriterCache.put(
          index.getId(),
          indexWriter);
View Full Code Here

      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());
      }
    }
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.store.IndexWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.