Date
1 - 4 of 4
Fetching TTL for individual graph vertices
Jerry He <jerr...@...>
Hi, Sankar You raised a good question. If you use the management API to get Edge Label (or any types) TTL, you will get the configured fixed TTL value. But if you try to retrieve the individual TTLs on the individual edges, you MAY get the 'remaining time' as you would want it. JanusGraph simply returns what it gets from the Cassandra backend. From the CQL documentation, it does seem that Cassandra returns the 'remaining time'. Please try it out with the driver you use. Thanks, Jerry On Sunday, September 17, 2017 at 11:20:06 PM UTC-7, Sankar Sangili wrote:
|
|
sankar...@...
Hi Jerry Thanks for the reply. The Sample use case could be like . John wantsBike BikeA . Here the edge label could have a ttl of 3 days. if i am suppose to understand all the users whose wantsBike TTL is about to expire in next 9 hours , How can i get it. In the tescases of JanusGraphTest ,I was not able to find the cases for finding the remaining TTL for the edge/vertex . I think it provides the configured time. Please let me know if my understanding is not right. Regards Sankar S On Saturday, September 16, 2017 at 12:39:16 AM UTC+5:30, Jerry He wrote:
|
|
Jerry He <jerr...@...>
What is the use case that you want to fetch individual TTLs. The TTLs are defined on VertexLable, EdgeLable and PropertyKey via the management API. After that anytime you can retrieve the generic TTL for a particular type, which is the pre-set fixed number. There are ways to get individual TTL. You can look at the TTL test cases in JanusGraphTest. Thanks, Jerry On Friday, September 15, 2017 at 6:21:39 AM UTC-7, Sankar Sangili wrote:
|
|
sankar...@...
Hi All, We are working on janusgraph-cassandra api, and have implemented TTL on vertex labels. But we want to fetch the value of TTL for each vertex, Below link gives reference to fetch TTL of individual records in Cassandra, and we want to implement this using janusgraph. Cassandra Query https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlSelect.html Cassandra Query :- 'SELECT TTL(race_name) FROM cycling.calendar WHERE race_id=200; Output: ttl(race_name) ---------------- 276 We want to implement above query of cassandra using janusgraph.
So, can you please give reference to some link, or give some clarity on how we can implement this using Janusgraph. |
|