I'm trying to print a graph in Faunus (v0.4.0) where a node has any edges (incoming or outgoing). From the gremlin shell, I tried:
g = FaunusFactory.open('faunus.properties')
g.V.filter("{it.bothE.hasNext()}").sideEffect("{println it}")
When I do this, I get a printout of all the nodes as I expected
But without the println, I do not.
According to How do I write a for loop in gremlin?, the gremlin terminal should print this info out for me, but it does not seem to.
Is there something specific I need to do to enable the printing from the console?
Faunus and Gremlin are close to each other in terms of purpose and functionality but not identical. The
filterisn't producing a side-effect, which will be written to HDFS. If you did:You could then view the list of ids matching that filter with something like:
to see the first 100 lines of the output. If you need more than just the element identifier you could do a
transformto get some of the element properties in there as well. You might find thesehdfshelper tips helpful.