Set TTL in AeroSpike with Spark



Hi guys,

I’m new to Aerospike. We are using Aerospike with Spark (Java) for our system.

I want to set TTL for a dataframe everytime the data is written to Aerospike. However, I could not find a way to do that even from document or Internet.

My current write syntax:

            .option("aerospike.set", Const.AEROSPIKE_SET)
            .option("aerospike.updateByKey", "id")

Can somebody tell me how to do that?

Thanks a lot.


The answer is here