congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DataIndexUtils.deserializeDataIndexRow
Code IndexAdd Tabnine to your IDE (free)

How to use
deserializeDataIndexRow
method
in
org.locationtech.geowave.core.store.base.dataidx.DataIndexUtils

Best Java code snippets using org.locationtech.geowave.core.store.base.dataidx.DataIndexUtils.deserializeDataIndexRow (Showing top 5 results out of 315)

origin: locationtech/geowave

public Iterator<GeoWaveRow> getRows(final byte[][] dataIds, final short adapterId) {
 final Map<byte[], byte[]> results =
   getCurrentSyncCollection().getAll(new HashSet<>(Arrays.asList(dataIds)));
 return Arrays.stream(dataIds).map(
   dataId -> DataIndexUtils.deserializeDataIndexRow(
     dataId,
     adapterId,
     results.get(dataId),
     visibilityEnabled)).iterator();
}
origin: locationtech/geowave

private BatchGetItemResult getResults(
  final Map<String, KeysAndAttributes> requestItems,
  final short adapterId,
  final Map<ByteArray, GeoWaveRow> resultMap) {
 final BatchGetItemRequest request = new BatchGetItemRequest(requestItems);
 final BatchGetItemResult result = client.batchGetItem(request);
 result.getResponses().values().forEach(results -> results.stream().forEach(objMap -> {
  final byte[] dataId = objMap.get(DynamoDBRow.GW_PARTITION_ID_KEY).getB().array();
  final AttributeValue valueAttr = objMap.get(DynamoDBRow.GW_VALUE_KEY);
  final byte[] value = valueAttr == null ? null : valueAttr.getB().array();
  resultMap.put(
    new ByteArray(dataId),
    DataIndexUtils.deserializeDataIndexRow(dataId, adapterId, value, false));
 }));
 return result;
}
origin: locationtech/geowave

 public synchronized CloseableIterator<GeoWaveRow> dataIndexIterator(final byte[][] dataIds) {
  final RocksDB readDb = getReadDb();
  if (readDb == null) {
   return new CloseableIterator.Empty<>();
  }
  try {
   final List<byte[]> dataIdsList = Arrays.asList(dataIds);
   final Map<byte[], byte[]> dataIdxResults = readDb.multiGet(dataIdsList);
   return new CloseableIterator.Wrapper(
     dataIdsList.stream().map(
       dataId -> DataIndexUtils.deserializeDataIndexRow(
         dataId,
         adapterId,
         dataIdxResults.get(dataId),
         visibilityEnabled)).iterator());
  } catch (final RocksDBException e) {
   LOGGER.error("Unable to get values by data ID", e);
  }
  return new CloseableIterator.Empty<>();
 }
}
origin: locationtech/geowave

public Iterator<GeoWaveRow> getDataIndexResults(
  final byte[][] rows,
  final short adapterId,
  final String... additionalAuthorizations) {
 Result[] results = null;
 final byte[] family = StringUtils.stringToBinary(ByteArrayUtils.shortToString(adapterId));
 try (final Table table = conn.getTable(getTableName(DataIndexUtils.DATA_ID_INDEX.getName()))) {
  results = table.get(Arrays.stream(rows).map(r -> {
   final Get g = new Get(r);
   g.addFamily(family);
   if ((additionalAuthorizations != null) && (additionalAuthorizations.length > 0)) {
    g.setAuthorizations(new Authorizations(additionalAuthorizations));
   }
   return g;
  }).collect(Collectors.toList()));
 } catch (final IOException e) {
  LOGGER.error("Unable to close HBase table", e);
 }
 if (results != null) {
  return Arrays.stream(results).map(
    r -> DataIndexUtils.deserializeDataIndexRow(
      r.getRow(),
      adapterId,
      r.getValue(family, new byte[0]),
      false)).iterator();
 }
 return Collections.emptyIterator();
}
origin: locationtech/geowave

 resultsMap.put(
   new ByteArray(d),
   DataIndexUtils.deserializeDataIndexRow(d, adapterId, v, options.isVisibilityEnabled()));
});
return Arrays.stream(dataIds).map(d -> resultsMap.get(new ByteArray(d))).iterator();
org.locationtech.geowave.core.store.base.dataidxDataIndexUtilsdeserializeDataIndexRow

Popular methods of DataIndexUtils

  • serializeDataIndexValue
  • isDataIndex
  • getDataIndexRetrieval
  • adapterSupportsDataIndex
  • deserializeDataIndexValue
  • getFieldValuesFromDataIdIndex
  • getRowReader

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now