Skip to content

Command Line Usage

Dan LaRocque edited this page Sep 5, 2014 · 9 revisions
This is the documentation for Faunus 0.4.
Faunus was merged into Titan and renamed Titan-Hadoop in version 0.5.
Documentation for the latest Titan version is available at http://s3.thinkaurelius.com/docs/titan/current.

There are three ways to use Gremlin/Faunus:

  1. Gremlin REPL: the interactive Gremlin shell.
  2. Gremlin script: submitting a Gremlin traversal as a file.
  3. Gremlin inline: submitting a Gremlin traversal as an inline parameter.

Gremlin REPL

To start the Gremlin REPL, simply do:

faunus$ bin/gremlin.sh 

         \,,,/
         (o o)
-----oOOo-(_)-oOOo-----
gremlin> 

Gremlin Script

Assume a file as follows:

g = FaunusFactory.open('bin/faunus.properties')
g.V.out('father').name.submit()

Note that FaunusPipeline.submit() is required to ultimately submit the job to the Hadoop cluster. In the Gremlin REPL, this is handled for the user automatically.

faunus$ bin/gremlin.sh -e test.groovy
12/09/18 15:35:39 INFO mapreduce.FaunusCompiler: Compiled to 2 MapReduce job(s)
...

Gremlin Inline

The arguments are as follows:

  • The location of the properties file denoting the FaunusGraph.
  • The Gremlin/Faunus script in quotes.
  • A set of overriding property values prefixed with -D (optional)
    • e.g. -Dfaunus.input.location=agraph mapred.map.tasks=1
faunus$ bin/gremlin.sh -i bin/faunus.properties "g.V.out('father').name"
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler: Faunus: Graph Analytics Engine
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:         ,
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:     ,   |\ ,__
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:     |\   \/   `\
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:     \ `-.:.     `\
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:      `-.__ `\/\/\|
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:         / `'/ () \
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:       .'   /\     )
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:    .-'  .'| \  \__
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:  .'  __(  \  '`(()
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler: /_.'`  `.  |    )(
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:          \ |
12/09/18 15:26:32 INFO mapreduce.FaunusCompiler:           |/