Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SequenceFileOutputFormat does not appear to support vertex-query-filter #170

Open
erickt opened this issue Jan 28, 2014 · 0 comments
Open

Comments

@erickt
Copy link

erickt commented Jan 28, 2014

On Faunus 0.4.1, it seems that sequence files don't get a vertex query filter applied to them when they are being loaded in:

gremlin> g=FaunusFactory.open('./bin/faunus.properties')
==>faunusgraph[graphsoninputformat->graphsonoutputformat]
gremlin> g.setGraphOutputFormat(SequenceFileOutputFormat.class)
==>null
gremlin> g._
...
gremlin> g2=g.getNextGraph()
==>faunusgraph[sequencefileinputformat->sequencefileoutputformat]
gremlin> g2.getConf().set('faunus.graph.input.vertex-query-filter', 'v.query().limit(0)')
==>null
gremlin> g2.setGraphOutputFormat(GraphSONOutputFormat.class)
==>null
gremlin> g2.V().sideEffect('{ it -> it.foo = "bar" }')
...

Produces:

{"name":"saturn","foo":"bar","type":"titan","_id":0,"_inE":[{"_id":12,"_outV":1,"_label":"father"}]}
{"name":"jupiter","foo":"bar","type":"god","_id":1,"_outE":[{"_id":13,"_inV":4,"_label":"lives"},{"_id":16,"_inV":3,"_label":"brother"},{"_id":14,"_inV":2,"_label":"brother"},{"_id":12,"_inV":0,"_label":"father"}],"_inE":[{"_id":17,"_outV":3,"_label":"brother"},{"_id":15,"_outV":2,"_label":"brother"},{"_id":24,"_outV":7,"_label":"father"}]}
{"name":"neptune","foo":"bar","type":"god","_id":2,"_outE":[{"_id":20,"_inV":5,"_label":"lives"},{"_id":19,"_inV":3,"_label":"brother"},{"_id":15,"_inV":1,"_label":"brother"}],"_inE":[{"_id":18,"_outV":3,"_label":"brother"},{"_id":14,"_outV":1,"_label":"brother"}]}
{"name":"pluto","foo":"bar","type":"god","_id":3,"_outE":[{"_id":23,"_inV":11,"_label":"pet"},{"_id":21,"_inV":6,"_label":"lives"},{"_id":17,"_inV":1,"_label":"brother"},{"_id":18,"_inV":2,"_label":"brother"}],"_inE":[{"_id":19,"_outV":2,"_label":"brother"},{"_id":16,"_outV":1,"_label":"brother"}]}
...

However, if you use GraphSONOutputFormat as the intermediate file, it works:

gremlin> g=FaunusFactory.open('./bin/faunus.properties')
==>faunusgraph[graphsoninputformat->graphsonoutputformat]
gremlin> g.setGraphOutputFormat(GraphSONOutputFormat.class)
==>null
gremlin> g._
...
gremlin> g2=g.getNextGraph()
==>faunusgraph[graphsoninputformat->graphsonoutputformat]
gremlin> g2.getConf().set('faunus.graph.input.vertex-query-filter', 'v.query().limit(0)')
==>null
gremlin> g2.setGraphOutputFormat(GraphSONOutputFormat.class)
==>null
gremlin> g2.V().sideEffect('{ it -> it.foo = "bar" }')...

Produces:

{"name":"saturn","foo":"bar","type":"titan","_id":0}
{"name":"jupiter","foo":"bar","type":"god","_id":1}
{"name":"neptune","foo":"bar","type":"god","_id":2}
{"name":"pluto","foo":"bar","type":"god","_id":3}
...
erickt pushed a commit to erickt/Dendrite that referenced this issue Jan 28, 2014
It turns out we can't do edge counting in one pass. Instead we
need to have one pass count the edges, and the other to filter
them out. Unfortunately we can't use binary sequence files
as our intermediate format because of this bug:

thinkaurelius/faunus#170
erickt pushed a commit to erickt/Dendrite that referenced this issue Jan 28, 2014
It turns out we can't do edge counting in one pass. Instead we
need to have one pass count the edges, and the other to filter
them out. Unfortunately we can't use binary sequence files
as our intermediate format because of this bug:

thinkaurelius/faunus#170
Brett55 pushed a commit to Brett55/Dendrite that referenced this issue May 22, 2014
It turns out we can't do edge counting in one pass. Instead we
need to have one pass count the edges, and the other to filter
them out. Unfortunately we can't use binary sequence files
as our intermediate format because of this bug:

thinkaurelius/faunus#170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant