Package mil.nga.giat.geowave.index

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


  }

  protected ByteArrayId getPeristenceTypeName(
      final Key key ) {
    if (key.getColumnFamily() != null) {
      return new ByteArrayId(
          key.getColumnFamily().getBytes());
    }
    return null;
  }
View Full Code Here


  protected ByteArrayId getCombinedId(
      final ByteArrayId primaryId,
      final ByteArrayId secondaryId ) {
    // the secondaryId is optional so check for null
    if (secondaryId != null) {
      return new ByteArrayId(
          primaryId.getString() + "_" + secondaryId.getString());
    }
    return primaryId;
  }
View Full Code Here

    return primaryId;
  }

  protected void addObject(
      final T object) {
    final ByteArrayId id = getPrimaryId(object);
    addObjectToCache(object);
    try {

      final Writer writer = accumuloOperations.createWriter(
          getAccumuloTablename(),
          true);
      synchronized (this) {
        if (!iteratorsAttached) {
          iteratorsAttached = true;
          final IteratorConfig[] configs = getIteratorConfig();
          if ((configs != null) && (configs.length > 0)) {
            accumuloOperations.attachIterators(
                getAccumuloTablename(),
                true,
                configs);
          }
        }
      }

      final Mutation mutation = new Mutation(
          new Text(
              id.getBytes()));
      final Text cf = getSafeText(getAccumuloColumnFamily());
      final Text cq = getSafeText(getAccumuloColumnQualifier(object));
      final byte[] visibility = getAccumuloVisibility(object);
      if (visibility != null) {
        mutation.put(
View Full Code Here

    }
  }

  protected void addObjectToCache(
      final T object ) {
    final ByteArrayId combinedId = getCombinedId(
        getPrimaryId(object),
        getSecondaryId(object));
    cache.put(
        combinedId,
        object);
View Full Code Here

  }

  protected Object getObjectFromCache(
      final ByteArrayId primaryId,
      final ByteArrayId secondaryId ) {
    final ByteArrayId combinedId = getCombinedId(
        primaryId,
        secondaryId);
    return cache.get(combinedId);
  }
View Full Code Here

  }

  protected boolean deleteObjectFromCache(
      final ByteArrayId primaryId,
      final ByteArrayId secondaryId ) {
    final ByteArrayId combinedId = getCombinedId(
        primaryId,
        secondaryId);
    return (cache.remove(combinedId) != null);
  }
View Full Code Here

    this.constraints = constraints;
    final BinnedNumericDataset[] queries = BinnedNumericDataset.applyBins(
        constraints,
        dimensionFields);
    for (final BinnedNumericDataset q : queries) {
      final ByteArrayId binId = new ByteArrayId(
          q.getBinId());
      List<MultiDimensionalNumericData> ranges = binnedConstraints.get(binId);
      if (ranges == null) {
        ranges = new ArrayList<MultiDimensionalNumericData>();
        binnedConstraints.put(
View Full Code Here

    final BinnedNumericDataset[] dataRanges = BinnedNumericDataset.applyBins(
        persistenceEncoding.getNumericData(dimensionFields),
        dimensionFields);
    // check that at least one data range overlaps at least one query range
    for (final BinnedNumericDataset dataRange : dataRanges) {
      final List<MultiDimensionalNumericData> queries = binnedConstraints.get(new ByteArrayId(
          dataRange.getBinId()));
      if (queries != null) {
        for (final MultiDimensionalNumericData query : queries) {
          if ((query != null) && overlaps(
              query,
View Full Code Here

      final ByteArrayId adapterId,
      final String... additionalAuthorizations ) {
    final String altIdxTableName = index.getId().getString() + AccumuloUtils.ALT_INDEX_TABLE;

    if (accumuloOptions.isUseAltIndex() && accumuloOperations.tableExists(altIdxTableName)) {
      final ByteArrayId rowId = getAltIndexRowId(
          altIdxTableName,
          dataId,
          adapterId);

      if (rowId != null) {
View Full Code Here

        scanner.fetchColumnFamily(new Text(
            adapterId.getBytes()));

        final Iterator<Map.Entry<Key, Value>> iterator = scanner.iterator();
        if (iterator.hasNext()) {
          return new ByteArrayId(
              iterator.next().getKey().getColumnQualifierData().getBackingArray());
        }

      }
      catch (final TableNotFoundException e) {
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.