Client-side batch operations: chain output of previous op into input of the next op

The topic title is a general idea, which if implemented, can be used to implement things like:

  1. Compare and set
  • Operation 1: Get someValue from bin
  • Operation 2: Set bin to newValue if operation 1 returned someOtherValue
  1. Dereference-and-get in one batch operation:
  • Assume the bin “idBinMap” contains a map: {id1:bin1, id2:bin2}
  • Operation 1: In “idBinMap” bin, use MapOperation to get the bin associated with someId
  • Operation 2: Get contents of the bin returned from operation 1

You can do 1) using a record udf that if you want you can also run in a background scan. 2) you should be able to do it using the Operate() API.

Hi @pgupta,

  1. I understand UDF can achieve this. But if UDF overhead is avoidable, especially as a primary use case, that’d be important.

  2. Can you write a short code (say Java) to demo how?

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.