Package mil.nga.giat.geowave.accumulo

Examples of mil.nga.giat.geowave.accumulo.AccumuloDataStore


    final MockInstance mockInstance = new MockInstance();
    final Connector mockConnector = mockInstance.getConnector(
        "root",
        new PasswordToken(
            new byte[0]));
    mockDataStore = new AccumuloDataStore(
        new BasicAccumuloOperations(
            mockConnector));

    adapter = new AccumuloRangeQueryTest().createGeometryAdapter();
    index = IndexType.SPATIAL_VECTOR.createDefaultIndex();
View Full Code Here


      final Index index,
      final String queryDescription )
      throws Exception {
    LOGGER.info("querying " + queryDescription);
    System.out.println("querying " + queryDescription);
    final mil.nga.giat.geowave.store.DataStore geowaveStore = new AccumuloDataStore(
        new AccumuloIndexStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloAdapterStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloDataStatisticsStore(
            GeoWaveITSuite.accumuloOperations),
            GeoWaveITSuite.accumuloOperations);
    // this file is the filtered dataset (using the previous file as a
    // filter) so use it to ensure the query worked
    final DistributableQuery query = resourceToQuery(savedFilterResource);
    final CloseableIterator<?> actualResults;
    if (index == null) {
      actualResults = geowaveStore.query(query);
    }
    else {
      actualResults = geowaveStore.query(
          index,
          query);
    }
    final ExpectedResults expectedResults = getExpectedResults(expectedResultsResources);
    int totalResults = 0;
View Full Code Here

      final IndexType indexType )
      throws Exception {
    LOGGER.info("deleting from " + indexType.toString() + " index");
    System.out.println("deleting from " + indexType.toString() + " index");
    boolean success = false;
    final mil.nga.giat.geowave.store.DataStore geowaveStore = new AccumuloDataStore(
        new AccumuloIndexStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloAdapterStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloDataStatisticsStore(
            GeoWaveITSuite.accumuloOperations),
            GeoWaveITSuite.accumuloOperations);
    final DistributableQuery query = resourceToQuery(savedFilterResource);
    final Index index = indexType.createDefaultIndex();
    final CloseableIterator<?> actualResults;

    actualResults = geowaveStore.query(
        index,
        query);

    SimpleFeature testFeature = null;
    while (actualResults.hasNext()) {
      final Object obj = actualResults.next();
      if ((testFeature == null) && (obj instanceof SimpleFeature)) {
        testFeature = (SimpleFeature) obj;
      }
    }
    actualResults.close();

    if (testFeature != null) {
      final ByteArrayId dataId = new ByteArrayId(
          testFeature.getID());
      final ByteArrayId adapterId = new ByteArrayId(
          testFeature.getFeatureType().getTypeName());

      if (geowaveStore.deleteEntry(
          index,
          dataId,
          adapterId)) {

        if (geowaveStore.getEntry(
            index,
            dataId,
            adapterId) == null) {
          success = true;
        }
View Full Code Here

    final MockInstance mockInstance = new MockInstance();
    final Connector mockConnector = mockInstance.getConnector(
        "root",
        new PasswordToken(
            new byte[0]));
    mockDataStore = new AccumuloDataStore(
        new BasicAccumuloOperations(
            mockConnector));

    index = IndexType.SPATIAL_VECTOR.createDefaultIndex();
    adapter = new TestGeometryAdapter();
View Full Code Here

    // GeoWave persists both the index and data adapter to the same accumulo
    // namespace as the data. The intent here
    // is that all data is discoverable without configuration/classes stored
    // outside of the accumulo instance.
    return new AccumuloDataStore(
        new AccumuloIndexStore(
            instance),
            new AccumuloAdapterStore(
                instance),
                new AccumuloDataStatisticsStore(
View Full Code Here

    testIngest(
        IndexType.SPATIAL_TEMPORAL_VECTOR,
        OSM_GPX_INPUT_DIR);
    final WritableDataAdapter<SimpleFeature>[] adapters = new GpxIngestPlugin().getDataAdapters(null);

    final mil.nga.giat.geowave.store.DataStore geowaveStore = new AccumuloDataStore(
        new AccumuloIndexStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloAdapterStore(
            GeoWaveITSuite.accumuloOperations),
        new AccumuloDataStatisticsStore(
            GeoWaveITSuite.accumuloOperations),
        GeoWaveITSuite.accumuloOperations);
    final Map<ByteArrayId, ExpectedResults> adapterIdToResultsMap = new HashMap<ByteArrayId, GeoWaveTestEnvironment.ExpectedResults>();
    for (final WritableDataAdapter<SimpleFeature> adapter : adapters) {
      adapterIdToResultsMap.put(
          adapter.getAdapterId(),
          getExpectedResults(geowaveStore.query(
              adapter,
              null)));
    }

    final List<ByteArrayId> firstTwoAdapters = new ArrayList<ByteArrayId>();
    firstTwoAdapters.add(adapters[0].getAdapterId());
    firstTwoAdapters.add(adapters[1].getAdapterId());
    final ExpectedResults firstTwoAdaptersResults = getExpectedResults(geowaveStore.query(
        firstTwoAdapters,
        null));
    final ExpectedResults fullDataSetResults = getExpectedResults(geowaveStore.query(null));
    // just for sanity verify its greater than 0 (ie. that data was actually
    // ingested in the first place)
    Assert.assertTrue(
        "There is no data ingested from OSM GPX test files",
        fullDataSetResults.count > 0);
View Full Code Here

        });
    final AccumuloOptions options = new AccumuloOptions();
    options.setPersistDataStatistics(false);
    // TODO consider an in memory statistics store that will write the
    // statistics when the job is completed
    dataStore = new AccumuloDataStore(
        indexStore,
        adapterStore,
        null,
        new ReducerContextWriterOperations(
            context,
View Full Code Here

        });
    final AccumuloOptions options = new AccumuloOptions();
    options.setPersistDataStatistics(false);
    // TODO consider an in memory statistics store that will write the
    // statistics when the job is completed
    dataStore = new AccumuloDataStore(
        indexStore,
        adapterStore,
        null,
        new ReducerContextWriterOperations(
            context,
View Full Code Here

        IOException {
      final Level l = getLogLevel(context);
      if (l != null) {
        LOGGER.setLevel(getLogLevel(context));
      }
      dataStore = new AccumuloDataStore(
          indexStore,
          adapterStore,
          statisticsStore,
          accumuloOperations);
      this.adapterStore = adapterStore;
View Full Code Here

    }
    if (localFileIngestPlugins.isEmpty()) {
      LOGGER.fatal("There were no local file ingest type plugin providers found");
      return;
    }
    final DataStore dataStore = new AccumuloDataStore(
        operations);
    try (IngestRunData runData = new IngestRunData(
        adapters,
        dataStore)) {
      processInput(
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.accumulo.AccumuloDataStore

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.