What Are The Units Of __expiry Column In Aerospike Connect Spark DataFrame


We’re currently testing a Spark job, the value of the __ttl column makes sense to us, but the __expiry column value when interpreted as seconds since epoch, suggests it is a date in 1982, which is obviously not correct. Can someone tell me how the number in this column should be converted to a human readable date? Thanks.

The __expiry column is referring to the “expiration epoch” (which should be Jan 1 2010, or 40 years after Unix epoch). The column __ttl is the “time to live” value calculated thus: expiration - now.

Can you please provide the actual values from the database and from the dataframe for ttl and expiry?

Thanks, that explain a lot. The numbers make sense now, according to the TTL we set at writing the data. Any idea why just the standard Unix epoch was not chosen? Is “expiration epoch” some standard thing? Or just something defined within Aerospike?


Aerospike epoch is specific to Aerospike with no external significance. It allows for farther out expiration times to be specified. Aerospike was founded about 10 years ago, and since expiration times are always in the future, times prior to that were not needed.

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