Package mil.nga.giat.geowave.accumulo

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


      final Key key,
      final Value value,
      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,
        value,
View Full Code Here


  protected boolean filter(
      final Text currentRow,
      final List<Key> keys,
      final List<Value> values ) {
    if ((gtFilter != null) && (model != null) && (dataAdapter != null)) {
      final AccumuloRowId rowId = new AccumuloRowId(
          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) {
        if (!geowaveFilter.accept(encoding)) {
          return false;
View Full Code Here

  protected boolean filter(
      final Text currentRow,
      final List<Key> keys,
      final List<Value> values ) {
    if ((filter != null) && (model != null)) {
      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);
    }
    // if the query filter or index model did not get sent to this iterator,
    // it'll just have to accept everything
View Full Code Here

  @SuppressWarnings("unchecked")
  private Entry<GeoWaveInputKey, T> decodeRow(
      final Entry<Key, Value> row,
      final QueryFilter clientFilter,
      final Index index ) {
    final AccumuloRowId rowId = new AccumuloRowId(
        row.getKey());
    final T value = (T) AccumuloUtils.decodeRow(
        row.getKey(),
        row.getValue(),
        rowId,
        adapterStore,
        clientFilter,
        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

      final Key key,
      final Value value,
      final DataAdapter<?> adapter,
      final QueryFilter clientFilter,
      final Index index ) {
    final AccumuloRowId rowId = new AccumuloRowId(
        key.getRow().copyBytes());
    return decodeRowObj(
        key,
        value,
        rowId,
View Full Code Here

      final Key key,
      final Value value,
      final AdapterStore adapterStore,
      final QueryFilter clientFilter,
      final Index index ) {
    final AccumuloRowId rowId = new AccumuloRowId(
        key.getRow().copyBytes());
    return decodeRowObj(
        key,
        value,
        rowId,
View Full Code Here

      // enough length values to be able to read the row ID again, we
      // lastly add a number of duplicates which can be useful as
      // metadata in our de-duplication
      // step
      rowIds.add(new ByteArrayId(
          new AccumuloRowId(
              indexId,
              dataId,
              adapterId,
              numberOfDuplicates).getRowId()));
    }
View Full Code Here

TOP

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

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.