Search code examples
aerospike

Storing and updating keys in Aerospike


I am aggregating statistics in Drill daily and will be wanting to store these results into Aerospike store.

Insert first time, and then do the updates.

I can access Drill from JDBC client; I can run a batch job to execute this ...

What is the recommended way to do the loading of the results into aerospike?

Is there a particular batch loader or a client that would be recommended for these data updates.

Also, how is Aerospike handling updates to the data.

Does it lock the key,value pair for reads if need to update the values?


Solution

  • There is no particular recommended way to load data into Aerospike. If you are using JDBC to do you queries on Drill, you may want to use the java client driver of Aerospike to write data using its API. To answer your specific questions....

    1. There is no batch-write functionality in Aerospike. But Aerospike's java client has async API. You may want to take a look at it.
    2. All the writes/updates to a record are serialized at the server side. So, two parallel updaters will not step on each other. Aerospike provides check-and-set operation which can be used to synchronize distributed read-modify-write cycles.