Examples of IngestEntryInfo


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

              indexName,
              accumuloOptions.isCreateTable(),
              ((AttachedIteratorDataAdapter) writableAdapter).getAttachedIteratorConfig());
        }
      }
      final IngestEntryInfo entryInfo = AccumuloUtils.write(
          writableAdapter,
          index,
          entry,
          writer,
          customFieldVisibilityWriter);

      writer.close();

      if (useAltIndex) {
        final Writer altIdxWriter = accumuloOperations.createWriter(
            altIdxTableName,
            accumuloOptions.isCreateTable());

        AccumuloUtils.writeAltIndex(
            writableAdapter,
            entryInfo,
            entry,
            altIdxWriter);

        altIdxWriter.close();
      }

      for (final DataStatisticsBuilder<T> builder : statisticsBuilders) {
        builder.entryIngested(
            entryInfo,
            entry);
        final Collection<DataStatistics<T>> statistics = builder.getStatistics();
        for (final DataStatistics<T> s : statistics) {
          statisticsStore.incorporateStatistics(s);
        }
      }

      return entryInfo.getRowIds();
    }
    catch (final TableNotFoundException | AccumuloException | AccumuloSecurityException e) {
      LOGGER.error(
          "Unable to ingest data entry",
          e);
View Full Code Here

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

      final T entry ) {
    final ByteArrayId adapterIdObj = writableAdapter.getAdapterId();

    final byte[] adapterId = writableAdapter.getAdapterId().getBytes();

    IngestEntryInfo entryInfo;
    synchronized (this) {
      dataStore.store(writableAdapter);
      dataStore.store(index);

      try {
        if (writableAdapter instanceof AttachedIteratorDataAdapter) {
          if (!DataAdapterAndIndexCache.getInstance(
              AttachedIteratorDataAdapter.ATTACHED_ITERATOR_CACHE_ID).add(
              adapterIdObj,
              indexName)) {
            accumuloOperations.attachIterators(
                indexName,
                accumuloOptions.isCreateTable(),
                ((AttachedIteratorDataAdapter) writableAdapter).getAttachedIteratorConfig());
          }
        }
        if (accumuloOptions.isUseLocalityGroups() && !accumuloOperations.localityGroupExists(
            indexName,
            adapterId)) {
          accumuloOperations.addLocalityGroup(
              indexName,
              adapterId);
        }
      }
      catch (AccumuloException | TableNotFoundException | AccumuloSecurityException e) {
        LOGGER.error(
            "Unable to determine existence of locality group [" + writableAdapter.getAdapterId().getString() + "]",
            e);
      }

      ensureOpen();
      entryInfo = AccumuloUtils.write(
          writableAdapter,
          index,
          entry,
          writer
          );

      if (useAltIndex) {
        AccumuloUtils.writeAltIndex(
            writableAdapter,
            entryInfo,
            entry,
            altIdxWriter);
      }
      if (persistStats) {
        List<DataStatisticsBuilder> stats;
        if (statsMap.containsKey(adapterIdObj)) {
          stats = statsMap.get(adapterIdObj);
        }
        else {
          if (writableAdapter instanceof StatisticalDataAdapter) {
            final ByteArrayId[] statisticsIds = ((StatisticalDataAdapter<T>) writableAdapter).getSupportedStatisticsIds();
            stats = new ArrayList<DataStatisticsBuilder>(
                statisticsIds.length);
            for (final ByteArrayId id : statisticsIds) {
              stats.add(new DataStatisticsBuilder<T>(
                  (StatisticalDataAdapter) writableAdapter,
                  id));
            }
            if ((stats != null) && stats.isEmpty()) {
              // if its an empty list, for simplicity just set it
              // to null
              stats = null;
            }
          }
          else {
            stats = null;
          }
          statsMap.put(
              adapterIdObj,
              stats);
        }
        if (stats != null) {
          for (final DataStatisticsBuilder<T> s : stats) {
            s.entryIngested(
                entryInfo,
                entry);
          }
        }
      }
    }
    return entryInfo.getRowIds();
  }
View Full Code Here

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

      // cannot get here unless adapter is found (not null)
      return Pair.of(
          adapter.decode(
              encodedRow,
              index),
          new IngestEntryInfo(
              Arrays.asList(new ByteArrayId(
                  k.getRowData().getBackingArray())),
              fieldInfoList));
    }
    return null;
View Full Code Here

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

      final WritableDataAdapter<T> writableAdapter,
      final Index index,
      final T entry,
      final Writer writer,
      final VisibilityWriter<T> customFieldVisibilityWriter ) {
    final IngestEntryInfo ingestInfo = getIngestInfo(
        writableAdapter,
        index,
        entry,
        customFieldVisibilityWriter);
    final List<Mutation> mutations = buildMutations(
View Full Code Here

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

  public static <T> List<Mutation> entryToMutations(
      final WritableDataAdapter<T> dataWriter,
      final Index index,
      final T entry,
      final VisibilityWriter<T> customFieldVisibilityWriter ) {
    final IngestEntryInfo ingestInfo = getIngestInfo(
        dataWriter,
        index,
        entry,
        customFieldVisibilityWriter);
    return buildMutations(
View Full Code Here

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

          if (fieldInfo != null) {
            fieldInfoList.add(fieldInfo);
          }
        }
      }
      return new IngestEntryInfo(
          rowIds,
          fieldInfoList);
    }
    LOGGER.warn("Indexing failed to produce insertion ids; entry [" + dataWriter.getDataId(entry).getString() +"] not saved.");
    return new IngestEntryInfo(
        Collections.EMPTY_LIST,
        Collections.EMPTY_LIST);

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.