Apache TinkerPop

AT

Apache TinkerPop

Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.

Join

Edge TTL not working for Janusgraph with Bigtable

I'm creating edges with TTL of 30 seconds but I can see those edges aren't getting deleted. I'm using Janusgraph 0.6.1 and I'm able to see a TTL of 30 seconds when I do gmt.getTTL(mgmt.getEdgeLabel("ttlTest3")).getSeconds(). What can be the cause of this?

g.V(1).property() on 1 item fails in 1.18.49

It seems 'anything property' on single item fails in gdotv 1.18.49: g.V(1).properties() -> [] g.V(1).propertyMap() -> [] g.V().propertyMap() is OK....
Solution:
hey, just for additional details, is that using gremlin server or another provider?

Setup and Configuration of SPARQL-Gremlin plugin (with ArcadeDB)

Dear All, I would like to use the SPARQL-Gremlin ( https://tinkerpop.apache.org/docs/current/reference/#sparql-gremlin ) plugin with the embedded Gremlin server in ArcadeDB. ArcadeDB exposes the gremlin-server.groovy, gremlin-server.properties, and gremlin-server.yaml files in its config directory. So my questions are: ...

TTL in nonstatic vertex labels Janusgraph

I wanted to set a TTL in some vertices but I don't want those vertices to be static. How can I implement TTL in Janusgraph since I cannot use the pre existing implementation of TTL because it requires the vertices to be static?

Temporal Versioning

I am exploring graph data models which support time travel ie. retaining old versions of documents and maintaining the ability to query both the old and the current versions. The methods I have seen suggest a type 2 approach of a "created" and "expired" property which allows you to know which is the current document version as well as how to query older versions. The method also recommends path copying from the point of the change up to the root. Finally, this method is defined as working well for DAGs but not for non-DAGs. Does anyone have experience with temporal versioning and the method I've described?...

g.E().properties().element() gives weird (wrong?) results

g.E().properties().element() doesn't return what I expect. Using TinkerPop modern: g.E().properties().element() [e[7][1-knows->2],...
Solution:
right, there is a bug. i see it. it's what i thought - relates to Property equality

Readable IDs vs GUIDs

I just upgraded gdotv from 0.9.x to 1.18.49 to check if an unexpected result still persists. However, the query results with the GUIDs make them near impossible to read. There's no way to check the result against the images of the modern dataset. Is there a way to get the old, normal IDs back (v1, v2, etc)?...
Solution:
Thanks for bringing it up, it's definitely something i hadn't thought of! Keep em coming 😁

Testing new Neptune version

Hey all, We're currently in Neptune 1.1.0.0. To prepare for the next Neptune version, 1.2.0.2, we made a pretty big test that covers up most of what is happening that utilizes Neptune. Doing extensive testing in our developer environment which doesn't have Neptune, we instead used a local Tinkerpop server of version 3.5.4, which according to the notes is the latest version utilized by Neptune....

Application of traversal strategies taking >6x longer than traversal execution

Has any providers dealt with traversal strategies taking a really long time in large nested traversals (nested with coalesce branches)? Just the default tinkerpop strategies are taking >120 ms to apply while the query executes in ~20 ms. I looked through and found it is the recurse applyTraversal function which I am thinking of rewriting with some other code but I don't know if it will be much faster. I figured other providers must have dealt with this as well....
Solution:
there are two fixes landing for this issue in 3.5.6/3.6.3 - these are the two PRs that are relevant: https://github.com/apache/tinkerpop/pull/2009 and https://github.com/apache/tinkerpop/pull/2026

TraversalOpProcessor Cache

I have following log in my gremlin server - INFO org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor - Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 600000 ms I can understand expiration time is in millisecond....

MergeE using the gremlin javascript client on AWS Neptune don't work

Doing a mergeE when using the javascript client (bytecode option) don't work coming back a Invalid OpProcessor requested [null] with code UnsupportedOperationException and 499 as status. The basic mergeE was: ```javascriptconst mergeEMap = new Map();...

Question about conversion of datetime to epoch

Hii, I wanted to know if there's a way to convert datetime stored in a node to epoch, without using lambdas because I don't want to compromise on performance. The reason why I'm doing this is to figure out the time difference between two timestamp values in nodes, something like this : - ...

Question about `local` step

Sometimes I don't understand how local step works. I want to count how many elements in each array, this query looks correct but gives unexpected result. How to fix it? g.inject([1,2],[1],[1,2]).local(unfold().count())...

Recommendation of a cache method

I have a complex query that involves ordering and traversing over several node types to obtain something like a cluster, the issue is when I have large number of nodes the query start to take longer time to evaluate. The use case is a user clicking on a word from a UI and I obtain a cluster of what come with it, What could be a possible way to cache the result, the result is not a number nor a string, its kind of array of a projection of several attributes calculated through the query....

Multiple labels not working in mergeV() syntax for conditional inserts in AWS Neptune

I know that multiple labels are an AWS Neptune specific feature and TinkerPop model does not allow for multiple labels, but maybe someone else has encountered the same problem. While attempting to migrate conditional inserts (upserts) to the new mergeV/E() syntax, I encountered an issue with vertices that have multiple labels. It appears that creating a vertex with multiple labels only works with the addV() step, which was present in the fold()/coalesce()/unfold() pattern for conditional inserts. In the new syntax, the label property is specified in a map, and a string such as 'Label1::Label2::Label3' will be treated as a single label. For example, the following code written in Gremlin-Java, creates a vertex with a single label called 'Label1::Label2', instead of 2 separate labels: ```...

Using a SeedStrategy in javascript to control shuffle.

On my project we are trying to select random vertices from the graph and use a seed to keep the results predictable. The docs mention passing in a SeedStrategy like so:
seedStrategy = new SeedStrategy(999998L)
g.withStrategies(seedStrategy).V().values('name').fold().order(local).by(shuffle)
seedStrategy = new SeedStrategy(999998L)
g.withStrategies(seedStrategy).V().values('name').fold().order(local).by(shuffle)
...

Horizontal cache for gremlin server deployment.

I have gremlin deployment, which has 3 pods within it. On top of it I have a load balancer to access this gremlin server. My understanding is each pod has its own gremlin cache that it maintains for the query used. Is horizontal cache supported by gremlin ? For instance all 3 pods share the same cache, Is it possible ?...

worker thread pool of 1, gremlin pool of 1 and boss thread pool of 1 ?

Hello - I have an remote gremlin setup backend as cassandra, In my gremlin remote logs I see a log statement "INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Gremlin Server configured with worker thread pool of 1, gremlin pool of 1 and boss thread pool of 1." Can some help me understand what does it meant by worker thread pool of 1, gremlin pool of 1 and boss thread pool of 1 ?

Multiple next() steps in a traversal

Is there a way to exit traversals at different steps? I tried using the next() step on a static, but it failed.

tell me writing query this pattern

vartex(orange): question: {code:string, type: string } vartex(purple):LeaningElement What I want to do is ...