Edge between nodes query causing "Frame size" exception

37 views
Skip to first unread message

Barney

unread,
Apr 10, 2015, 5:22:00 PM4/10/15
to aureliu...@googlegroups.com
We have a graph where many vertices have tens of thousands of edges. When trying to execute the following query to find the edge between two vertices:

g.v(node_a).as('v1').bothE(label).as('e').bothV.retain([g.v(node_b)]).as('v2').select(['e', 'v1', 'v2'])

We are getting the exception:

org.apache.thrift.transport.TTransportException: Frame size (16395455) larger than max length (16384000)!

(I can share a full stack trace but this seems like a relatively common error)

From everything I've read around the topic on the forum and elsewhere the easy option is to just increase the "storage.cassandra.thrift.frame-size" setting. However, I was wondering if there was a better way to achieve the above query that would avoid the exception and wouldn't require increasing that setting? As our dataset continues to grow we would presumably have to keep increasing it and I don't know what the repercussions of this would be.

Thanks for any help.

Daniel Kuppitz

unread,
Apr 10, 2015, 8:31:33 PM4/10/15
to aureliu...@googlegroups.com
Hey Barney,

You can get around this by increasing the max. allowed thrift frame size, but I wouldn't do that. Try to use Titan's query API instead (should be a lot better/faster in this case).

Untested sample code:

a = g.v(node_a)
b = g.v(node_b)
a.query().direction(BOTH).labels(label).adjacentVertex(b).edges()

Cheers,
Daniel


--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/ca0e8124-bb0b-4edf-aa99-e060a9f93452%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Barney

unread,
Apr 13, 2015, 8:37:26 PM4/13/15
to aureliu...@googlegroups.com
Thanks Daniel, I'll have a go with this and come back with results.
Reply all
Reply to author
Forward
0 new messages