Package mil.nga.giat.geowave.index

Examples of mil.nga.giat.geowave.index.ByteArrayId


    if (!supportsMultipleIndices() && !persistenceEncoding.isDuplicated()) {
      // short circuit this check if the row is not duplicated anywhere
      // and this is only intended to support a single index
      return true;
    }
    final ByteArrayId adapterId = persistenceEncoding.getAdapterId();
    final ByteArrayId dataId = persistenceEncoding.getDataId();
    Set<ByteArrayId> visitedDataIds = adapterIdToVisitedDataIdMap.get(adapterId);
    if (visitedDataIds == null) {
      visitedDataIds = new HashSet<ByteArrayId>();
      adapterIdToVisitedDataIdMap.put(
          adapterId,
View Full Code Here


      final Context context )
      throws IOException,
      InterruptedException {
    final AccumuloRowId rowElements = new AccumuloRowId(
        key);
    if (!new ByteArrayId(
        rowElements.getAdapterId()).equals(adapter.getAdapterId())) {
      return;
    }
    final Object feature = AccumuloUtils.decodeRow(
        key,
View Full Code Here

      final RasterTile<T> rasterTile = (RasterTile) mergeable;
      return new MergeableRasterTile<T>(
          rasterTile.getDataBuffer(),
          rasterTile.getMetadata(),
          mergeStrategy,
          new ByteArrayId(
              key.getColumnFamily().getBytes()));
    }
    return mergeable;
  }
View Full Code Here

        user,
        password,
        namespace);
    final AdapterStore adapterStore = new AccumuloAdapterStore(
        ops);
    final DataAdapter<?> adapter = adapterStore.getAdapter(new ByteArrayId(
        StringUtils.stringToBinary(featureType)));
    conf.set(
        GaussianCellMapper.DATA_ADAPTER_KEY,
        ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(adapter)));
    conf.setInt(
View Full Code Here

    for (int i = 0; i < adapterIdSize; i++) {
      final int keyLength = buf.getInt();
      final byte[] keyBytes = new byte[keyLength];
      buf.get(keyBytes);
      adapterIdToSampleModelKey.put(
          new ByteArrayId(
              keyBytes),
          buf.getInt());
    }

  }
View Full Code Here

  }

  public <T> List<ByteArrayId> writeInternal(
      final WritableDataAdapter<T> writableAdapter,
      final T entry ) {
    final ByteArrayId adapterIdObj = writableAdapter.getAdapterId();

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

    IngestEntryInfo entryInfo;
    synchronized (this) {
View Full Code Here

          currentRow.copyBytes());
      final PersistentDataset<CommonIndexValue> commonData = new PersistentDataset<CommonIndexValue>();
      final PersistentDataset<Object> extendedData = new PersistentDataset<Object>();
      for (int i = 0; (i < keys.size()) && (i < values.size()); i++) {
        final Key key = keys.get(i);
        final ByteArrayId fieldId = new ByteArrayId(
            key.getColumnQualifierData().getBackingArray());
        final FieldReader<? extends CommonIndexValue> reader = model.getReader(fieldId);
        if (reader == null) {
          // try extended data
          final FieldReader<Object> extReader = dataAdapter.getReader(fieldId);
          if (extReader == null) {
            continue;
          }
          final Object fieldValue = extReader.readField(values.get(
              i).get());
          extendedData.addValue(new PersistentValue<Object>(
              fieldId,
              fieldValue));
        }
        else {
          final CommonIndexValue fieldValue = reader.readField(values.get(
              i).get());
          fieldValue.setVisibility(key.getColumnVisibilityData().getBackingArray());
          commonData.addValue(new PersistentValue<CommonIndexValue>(
              fieldId,
              fieldValue));
        }
      }
      final IndexedAdapterPersistenceEncoding encoding = new IndexedAdapterPersistenceEncoding(
          new ByteArrayId(
              rowId.getAdapterId()),
          new ByteArrayId(
              rowId.getDataId()),
          new ByteArrayId(
              rowId.getIndexId()),
          rowId.getNumberOfDuplicates(),
          commonData,
          extendedData);
      if (geowaveFilter != null) {
View Full Code Here

    assertEquals(
        3,
        source.getCount(query));

    CloseableIterator<DataStatistics<?>> stats = dataStore.dataStore.getStatsStore().getDataStatistics(
        new ByteArrayId(
            "geostuff".getBytes()));
    assertTrue(stats.hasNext());
    DataStatistics<?> stats1 = stats.next();
    assertTrue(stats.hasNext());
    DataStatistics<?> stats2 = stats.next();
View Full Code Here

      final AccumuloRowId rowId = new AccumuloRowId(
          currentRow.getBytes());
      final PersistentDataset<CommonIndexValue> commonData = new PersistentDataset<CommonIndexValue>();
      for (int i = 0; (i < keys.size()) && (i < values.size()); i++) {
        final Key key = keys.get(i);
        final ByteArrayId fieldId = new ByteArrayId(
            key.getColumnQualifierData().getBackingArray());
        final FieldReader<? extends CommonIndexValue> reader = model.getReader(fieldId);
        if (reader == null) {
          continue;
        }
        final CommonIndexValue fieldValue = reader.readField(values.get(
            i).get());
        fieldValue.setVisibility(key.getColumnVisibilityData().getBackingArray());
        commonData.addValue(new PersistentValue<CommonIndexValue>(
            fieldId,
            fieldValue));
      }
      final IndexedPersistenceEncoding encoding = new IndexedPersistenceEncoding(
          new ByteArrayId(
              rowId.getAdapterId()),
          new ByteArrayId(
              rowId.getDataId()),
          new ByteArrayId(
              rowId.getIndexId()),
          rowId.getNumberOfDuplicates(),
          commonData);
      return filter.accept(encoding);
    }
View Full Code Here

        index);
    if (value == null) {
      return null;
    }
    final GeoWaveInputKey key = new GeoWaveInputKey(
        new ByteArrayId(
            rowId.getAdapterId()),
        new ByteArrayId(
            rowId.getDataId()));
    key.setAccumuloKey(row.getKey());
    return new GeoWaveInputFormatEntry(
        key,
        value);
View Full Code Here

TOP

Related Classes of mil.nga.giat.geowave.index.ByteArrayId

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.