This file contains 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
CODE: | |
@Test | |
public void shouldApplyStrategiesCorrectly() { | |
Traversal.Admin<?, ?> traversal = __.out().count().asAdmin(); | |
traversal.setStrategies(TraversalStrategies.GlobalCache.getStrategies(Graph.class)); | |
int found = 0; | |
for (final String line : traversal.explain().toString().split("\n")) { | |
if (line.contains("AdjacentToIncidentStrategy") && line.contains("[VertexStep(OUT,edge)")) |
This file contains 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
// This can be imported via ./bin/gremlin.sh -i describe.groovy | |
// A variable 'graph' must be defined with a JanusGraph graph | |
// Run it as a plugin command ':schema' | |
// :schema describe | |
// | |
import org.janusgraph.graphdb.database.management.MgmtLogType | |
import org.codehaus.groovy.tools.shell.Groovysh | |
import org.codehaus.groovy.tools.shell.CommandSupport |
This file contains 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
// cut and paste or run with ./bin/gremlin.sh -i mustafa.groovy | |
graph = TinkerGraph.open() | |
System.out.println("graph open"); | |
g = graph.traversal(); | |
System.out.println("vertex creation started"); | |
n = 10000; |
This file contains 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
[ | |
{ | |
"name": "COLEMAK-SHOLES-WORKMAN" | |
}, | |
[ | |
{ | |
"a": 7 | |
}, | |
"Tab", | |
{ |
This file contains 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
// set this to your server gremlin pool | |
cores = 8 | |
cluster = Cluster.open('conf/remote.yaml'); | |
client = cluster.connect(); | |
client.submit("graph.createIndex('name',Vertex.class)").all().get() | |
// NEO4J | |
//client.submit("graph.cypher('CREATE INDEX ON :production_part(name)')").all().get() |
This file contains 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
[ | |
{ | |
"name": "spok2 full" | |
}, | |
[ | |
{ | |
"x": 2 | |
}, | |
"@\n2", | |
"#\n3", |
This file contains 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
[ | |
{ | |
"name": "spok2 half" | |
}, | |
[ | |
{ | |
"x": 2 | |
}, | |
"@\n2", | |
"#\n3", |
This file contains 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
[ | |
{ | |
"name": "column staggered rotated thumb half" | |
}, | |
[ | |
{ | |
"x": 3 | |
}, | |
"#\n3" | |
], |
This file contains 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
[ | |
{ | |
"name": "column staggered rotated thumb full" | |
}, | |
[ | |
{ | |
"x": 3 | |
}, | |
"#\n3", | |
{ |
This file contains 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
[ | |
{ | |
"name": "pinky staggered rotated thumb half" | |
}, | |
[ | |
{ | |
"x": 2 | |
}, | |
"@\n2", | |
"#\n3", |
NewerOlder