mergeV/E(Map|Traversal search).
option(Merge.onCreate, Map|Traversal).
option(Merge.onMatch, Map|Traversal)
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
https://groups.google.com/g/gremlin-users/c/6EXYq2Howdo/m/hST6BW97AgAJ | |
The reason properties on properties makes sense for vertices and not for | |
edges is rooted in database design and not logical semantics. | |
A property on a vertex is a record as is an edge in the database sense. | |
Hence, we have use cases where we want to know who added a property on a | |
vertex (as a record). | |
For edges, the property on the edge is not a record and thinking about it | |
as such would make the data model really complex (because you could then | |
get recursively more complex). Hence, all properties of the edge are part |
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
host = "localhost" | |
requests = 10000 | |
cluster = Cluster.open() | |
g = traversal().withRemote(DriverRemoteConnection.using(cluster)) | |
println("vertices at start: " + g.V().count().next()) | |
println("edges at start: " + g.E().count().next()) | |
start = System.currentTimeMillis() | |
(0..<50000).each{ |
git clone https://github.com/spmallette/rouge
cd rouge
git checkout mm-adt
- Build the gem:
$ gem build rouge.gemspec
- Locally install the gem:
$ gem install --local rouge-3.4.1.pre.mmadt.gem
- In the terminal where you are running asciidoctor set the
ROUGE_VERSION
environment variable:$ export ROUGE_VERSION=3.4.1.pre.mmadt
- Use
mmadt
as the "format" as in[source,mmadt]
within asciidoc files. - Set the
source-highlighter
to "rouge". $ asciidoctor -a source-highlighter=rouge -a rouge-style=thankful_eyes *.adoc -D html/
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration version="1.0" name="AllocationProfiling" description="Low overhead configuration safe for continuous use in production environments, typically less than 1 % overhead." provider="Oracle"> | |
<producer uri="http://www.oracle.com/hotspot/jvm/" label="Oracle JDK"> | |
<control> | |
<selection name="gc-level" default="detailed" label="Garbage Collector"> | |
<option label="Off" name="off">off</option> | |
<option label="Normal" name="detailed">normal</option> |
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
# titan 1.0.0 | |
storage.backend=hbase | |
storage.hostname=<zookeeper server ips here> | |
#IMPORTANT - must match zookeeper.znode.parent property | |
# of your hadoop cluster | |
storage.hbase.ext.zookeeper.znode.parent=/hbase-unsecure | |
cache.db-cache = true | |
cache.db-cache-clean-wait = 20 |
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
graph = TinkerGraph.open() | |
graph.createIndex("name", Vertex.class) | |
g = graph.traversal() | |
// Query 1 | |
person1 = graph.addVertex(label, 'person', 'name', 'Michael Sherman') | |
person2 = graph.addVertex(label, 'person', 'name', 'Zoltan Varju') | |
person3 = graph.addVertex(label, 'person', 'name', 'Peter Neubauer') | |
person4 = graph.addVertex(label, 'person', 'name', 'Grace Andrews') | |
person5 = graph.addVertex(label, 'person', 'name', 'Michael Hunger') |
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
---------------------------WARMUP CYCLE--------------------------- | |
[warmup-1] requests: 1000 | time(s): 0.6018506 | req/sec: 1662 | too slow: 0 | |
[warmup-2] requests: 1000 | time(s): 0.291263201 | req/sec: 3433 | too slow: 0 | |
[warmup-3] requests: 1000 | time(s): 0.286894137 | req/sec: 3486 | too slow: 0 | |
[warmup-4] requests: 1000 | time(s): 0.221449842 | req/sec: 4516 | too slow: 0 | |
[warmup-5] requests: 1000 | time(s): 0.238359071 | req/sec: 4195 | too slow: 0 | |
----------------------------TEST CYCLE---------------------------- | |
[test-1] requests: 50000 | time(s): 4.774514652 | req/sec: 10472 | too slow: 0 | |
[test-2] requests: 50000 | time(s): 4.031655607 | req/sec: 12402 | too slow: 0 | |
[test-3] requests: 50000 | time(s): 4.034091315 | req/sec: 12394 | too slow: 0 |
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
#!upstart | |
description "Gremlin Server" | |
env GREMLIN_USER=ubuntu | |
env GREMLIN_GROUP=ubuntu | |
env GREMLIN_PID_FILE=/var/run/gremlin.pid | |
env GREMLIN_HOME=/usr/local/gremlin-server-3.0.0.M5 | |
env GREMLIN_LOG=/var/log/gremlin/gremlin-server.log | |
# uncomment the next line if you want Gremlin Server to start automatically after system reboots |
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
public static String getClosureBody(final Closure closure) { | |
def node = closure.getMetaClass().getClassNode().getDeclaredMethods("doCall")[0].getCode(); | |
def writer = new StringWriter() | |
node.visit(new AstNodeToGremlinScriptVisitor(writer)) | |
return writer.toString() | |
} | |
class AstNodeToGremlinScriptVisitor extends AstNodeToScriptVisitor { | |
def AstNodeToGremlinScriptVisitor(Writer writer, boolean showScriptFreeForm = true, boolean showScriptClass = true) { | |
super(writer, showScriptFreeForm, showScriptClass) |
NewerOlder