This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faunus$ bin/gremlin.sh | |
\,,,/ | |
(o o) | |
-----oOOo-(_)-oOOo----- | |
gremlin> g = FaunusFactory.open("bin/faunus-titan.properties") | |
==>faunusgraph[TitanCassandraInputFormat] | |
gremlin> g.V | |
==>com.thinkaurelius.faunus.FaunusPipeline@326cbecf | |
gremlin> g.V.out('name').groupCount().submit() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faunus$ bin/gremlin.sh | |
\,,,/ | |
(o o) | |
-----oOOo-(_)-oOOo----- | |
gremlin> g = FaunusFactory.open("bin/faunus-titan.properties") | |
==>faunusgraph[titancassandrainputformat] | |
gremlin> g.V.out.name.groupCount.submit() | |
12/09/11 17:36:09 INFO mapreduce.FaunusCompiler: Faunus: A Library of Hadoop-Based Graph Tools | |
12/09/11 17:36:09 INFO mapreduce.FaunusCompiler: , |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faunus$ bin/gremlin.sh | |
\,,,/ | |
(o o) | |
-----oOOo-(_)-oOOo----- | |
gremlin> g = FaunusFactory.open('bin/faunus-titan.properties') | |
==>faunusgraph[titancassandrainputformat] | |
gremlin> g.V.out('father').out('father').toString() | |
==>[VerticesMap, VerticesVerticesMapReduce(OUT,[father]), VerticesVerticesMapReduce(OUT,[father])] | |
gremlin> g.V.out('father').out('father').drop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
faunus$ bin/gremlin.sh -i 'g.E.label.groupCount' | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: Faunus: A Library of Hadoop-Based Graph Tools | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: , | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: , |\ ,__ | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: |\ \/ `\ | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: \ `-.:. `\ | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: `-.__ `\/\/\| | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: / `'/ () \ | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: .' /\ ) | |
12/09/12 11:28:11 INFO mapreduce.FaunusCompiler: .-' .'| \ \__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$HADOOP_CONF_DIR" != "" ] ; then | |
CP=$CP:$HADOOP_CONF_DIR | |
elif [ "$HADOOP_CONF" != "" ] ; then | |
CP=$CP:$HADOOP_CONF | |
else | |
CP=$CP:$HADOOP_HOME/conf | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testStartupCosts() throws Exception { | |
final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(); | |
CompiledScript script1 = engine.compile(""); | |
CompiledScript script2 = engine.compile("1+1"); | |
int runs = 750; | |
long totalTime = 0l; | |
for (int i = 0; i < runs; i++) { | |
long time = System.currentTimeMillis(); | |
//engine.eval(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testStartupCostsEngineVsCompiled() throws Exception { | |
final GremlinGroovyScriptEngine engine = new GremlinGroovyScriptEngine(); | |
Bindings bindings = engine.createBindings(); | |
bindings.put("g", TinkerGraphFactory.createTinkerGraph()); | |
int runs = 500; | |
long totalTime = 0l; | |
for (int i = 0; i < runs; i++) { | |
long time = System.currentTimeMillis(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TransactionalGraph g = new EgoSystemGraph(); | |
AddFollowsExtension af = new AddFollowsExtension(); | |
JSONObject request = new JSONObject(''' | |
{ | |
sourceIdentity: {uri:'http://marko'}, | |
targetIdentities: [{uri:'http://herbert'}], | |
inOrOut: 'out' | |
} | |
'''); | |
assertFalse(af.addFollows(new RexsterResourceContext(null, null, null, request, null, null, null), g).errorResponse); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testAddOneAuthor() { | |
TransactionalGraph g = new EgoSystemGraph(); | |
AddAuthoredExtension aa = new AddAuthoredExtension(); | |
JSONObject request = new JSONObject(''' | |
{ | |
uri:'http://mypaper', | |
title:'My Paper', | |
citations:455, | |
keywords:[{uri:'keyword:blah'},{uri:'keyword:bam'}], | |
authors: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Core: | |
{ | |
person: {uuid:'1234',name:'marko'}, | |
identities : [ | |
{service:'twitter',handle:'@twarko',uri:'http://twitter.com/twarko'}, | |
{service:'lanl',handle:209893, uri:'http://people.lanl.gov/209893'} | |
] | |
} |