public class HadoopPipeline extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
HadoopPipeline.State |
| Modifier and Type | Field and Description |
|---|---|
protected HadoopCompiler |
compiler |
protected static ScriptEngine |
engine |
protected HadoopGraph |
graph |
static String |
PIPELINE_IS_LOCKED |
protected HadoopPipeline.State |
state |
protected List<String> |
stringRepresentation |
| Constructor and Description |
|---|
HadoopPipeline(HadoopGraph graph)
Construct a HadoopPipeline
|
| Modifier and Type | Method and Description |
|---|---|
HadoopPipeline |
_()
The identity step does not alter the graph in anyway.
|
HadoopPipeline |
as(String name)
Name a step in order to reference it later in the expression.
|
HadoopPipeline |
back(String step)
Go back to an element a named step ago.
|
HadoopPipeline |
both(String... labels)
Take both incoming and outgoing labeled edges to adjacent vertices.
|
HadoopPipeline |
bothE(String... labels)
Take both incoming and outgoing labeled edges to incident edges.
|
HadoopPipeline |
bothV()
Go to both the incoming/head and outgoing/tail vertices of the edge.
|
HadoopPipeline |
count()
Count the number of traversers currently in the graph
|
HadoopPipeline |
dedup()
Remove any duplicate traversers at a single element.
|
HadoopPipeline |
drop()
Drop all the elements of respective type at the current step.
|
HadoopPipeline |
E()
Start a traversal at all edges in the graph.
|
HadoopPipeline |
filter(String closure)
Emit or deny the current element based upon the provided boolean-based closure.
|
HadoopCompiler |
getCompiler() |
HadoopGraph |
getGraph()
Get a reference to the graph currently being used in this HadoopPipeline.
|
HadoopPipeline |
groupCount()
Count the number of times the previous element (or property) has been traversed to.
|
HadoopPipeline |
groupCount(String keyClosure)
Apply the provided closure to the incoming element to determine the grouping key.
|
HadoopPipeline |
groupCount(String keyClosure,
String valueClosure)
Apply the provided closure to the incoming element to determine the grouping key.
|
HadoopPipeline |
has(String key,
com.tinkerpop.blueprints.Compare compare,
Object... values)
Emit the current element if it has a property value comparable to the provided values.
|
HadoopPipeline |
has(String key,
Object... values)
Emit the current element it has a property value equal to the provided values.
|
HadoopPipeline |
has(String key,
com.tinkerpop.gremlin.Tokens.T compare,
Object... values)
Emit the current element if it has a property value comparable to the provided values.
|
HadoopPipeline |
hasNot(String key,
com.tinkerpop.blueprints.Compare compare,
Object... values)
Emit the current element if it does not have a property value comparable to the provided values.
|
HadoopPipeline |
hasNot(String key,
Object... values)
Emit the current element it does not have a property value equal to the provided values.
|
HadoopPipeline |
hasNot(String key,
com.tinkerpop.gremlin.Tokens.T compare,
Object... values)
Emit the current element if it does not have a property value comparable to the provided values.
|
HadoopPipeline |
in(String... labels)
Take incoming labeled edges to adjacent vertices.
|
HadoopPipeline |
inE(String... labels)
Take incoming labeled edges to incident edges.
|
HadoopPipeline |
interval(String key,
Object startValue,
Object endValue)
Emit the current element it has a property value equal within the provided range.
|
HadoopPipeline |
inV()
Go to the incoming/head vertex of the edge.
|
HadoopPipeline |
keep()
Keep all the elements of the respetive type at the current step.
|
HadoopPipeline |
label()
Emit the label of the current edge.
|
HadoopPipeline |
linkIn(String label,
String step)
Have the elements for the named step previous project an edge to the current vertex with provided label.
|
HadoopPipeline |
linkIn(String label,
String step,
String mergeWeightKey)
Have the elements for the named step previous project an edge to the current vertex with provided label.
|
HadoopPipeline |
linkOut(String label,
String step)
Have the elements for the named step previous project an edge from the current vertex with provided label.
|
HadoopPipeline |
linkOut(String label,
String step,
String mergeWeightKey)
Have the elements for the named step previous project an edge from the current vertex with provided label.
|
HadoopPipeline |
map()
Emit a string representation of the property map.
|
HadoopPipeline |
order(com.tinkerpop.gremlin.Tokens.T order)
Order the previous property value results.
|
HadoopPipeline |
order(com.tinkerpop.gremlin.Tokens.T order,
String elementKey)
Order the previous property value results and emit them with another element property value.
|
HadoopPipeline |
order(com.tinkerpop.pipes.transform.TransformPipe.Order order)
Order the previous property value results.
|
HadoopPipeline |
order(com.tinkerpop.pipes.transform.TransformPipe.Order order,
String elementKey)
Order the previous property value results and emit them with another element property value.
|
HadoopPipeline |
out(String... labels)
Take outgoing labeled edges to adjacent vertices.
|
HadoopPipeline |
outE(String... labels)
Take outgoing labeled edges to incident edges.
|
HadoopPipeline |
outV()
Go to the outgoing/tail vertex of the edge.
|
HadoopPipeline |
path()
Emit the path taken from start to current element.
|
HadoopPipeline |
property(String key)
Emit the property value of an element.
|
HadoopPipeline |
property(String key,
Class type)
Emit the property value of an element.
|
HadoopPipeline |
script(String scriptUri,
String... args) |
HadoopPipeline |
sideEffect(String closure)
Emit the element, but compute some sideeffect in the process.
|
HadoopPipeline |
simplePath()
Emit the element only if it was arrived at via a path that does not have cycles in it.
|
int |
submit()
Submit the HadoopPipeline to the Hadoop cluster.
|
int |
submit(String script,
Boolean showHeader)
Submit the HadoopPipeline to the Hadoop cluster and ensure that a header is emitted in the logs.
|
String |
toString() |
HadoopPipeline |
transform(String closure)
Apply the provided closure to the current element and emit the result.
|
HadoopPipeline |
V()
Start a traversal at all vertices in the graph.
|
HadoopPipeline |
v(long... ids)
Start a traversal at the vertices identified by the provided ids.
|
protected static final ScriptEngine engine
public static final String PIPELINE_IS_LOCKED
protected final HadoopCompiler compiler
protected final HadoopGraph graph
protected final HadoopPipeline.State state
public HadoopPipeline(HadoopGraph graph)
graph - the HadoopGraph that is the source of the traversalpublic HadoopPipeline _()
public HadoopPipeline transform(String closure)
closure - the closure to apply to the elementpublic HadoopPipeline V()
public HadoopPipeline E()
public HadoopPipeline v(long... ids)
ids - the long ids of the vertices to start the traversal frompublic HadoopPipeline out(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline in(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline both(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline outE(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline inE(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline bothE(String... labels)
labels - the labels of the edges to traverse overpublic HadoopPipeline outV()
public HadoopPipeline inV()
public HadoopPipeline bothV()
public HadoopPipeline property(String key, Class type)
key - the key identifying the propertytype - the class of the property value (so Hadoop can intelligently handle the result)public HadoopPipeline property(String key)
key - the key identifying the propertypublic HadoopPipeline map()
public HadoopPipeline label()
public HadoopPipeline path()
public HadoopPipeline order(com.tinkerpop.pipes.transform.TransformPipe.Order order, String elementKey)
order - increasing and descending orderelementKey - the key of the element to associate it withpublic HadoopPipeline order(com.tinkerpop.pipes.transform.TransformPipe.Order order)
order - increasing and descending orderpublic HadoopPipeline order(com.tinkerpop.gremlin.Tokens.T order, String elementKey)
order - increasing and descending orderelementKey - the key of the element to associate it withpublic HadoopPipeline order(com.tinkerpop.gremlin.Tokens.T order)
order - increasing and descending orderpublic HadoopPipeline filter(String closure)
closure - return true to emit and false to remove.public HadoopPipeline has(String key, com.tinkerpop.gremlin.Tokens.T compare, Object... values)
key - the property key of the elementcompare - the comparatorvalues - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline hasNot(String key, com.tinkerpop.gremlin.Tokens.T compare, Object... values)
key - the property key of the elementcompare - the comparator (will be not'd)values - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline has(String key, com.tinkerpop.blueprints.Compare compare, Object... values)
key - the property key of the elementcompare - the comparatorvalues - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline hasNot(String key, com.tinkerpop.blueprints.Compare compare, Object... values)
key - the property key of the elementcompare - the comparator (will be not'd)values - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline has(String key, Object... values)
key - the property key of the elementvalues - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline hasNot(String key, Object... values)
key - the property key of the elementvalues - the values to compare against where only one needs to succeed (or'd)public HadoopPipeline interval(String key, Object startValue, Object endValue)
key - the property key of the elementstartValue - the start of the range (inclusive)endValue - the end of the range (exclusive)public HadoopPipeline dedup()
public HadoopPipeline back(String step)
step - the name of the step to back up topublic HadoopPipeline simplePath()
public HadoopPipeline sideEffect(String closure)
closure - the sideeffect closure whose results are ignored.public HadoopPipeline as(String name)
name - the string representation of the namepublic HadoopPipeline linkIn(String label, String step, String mergeWeightKey)
step - the name of the step where the source vertices werelabel - the label of the edge to projectmergeWeightKey - the property key to use for weightpublic HadoopPipeline linkIn(String label, String step)
step - the name of the step where the source vertices werelabel - the label of the edge to projectpublic HadoopPipeline linkOut(String label, String step, String mergeWeightKey)
step - the name of the step where the source vertices werelabel - the label of the edge to projectmergeWeightKey - the property key to use for weightpublic HadoopPipeline linkOut(String label, String step)
step - the name of the step where the source vertices werelabel - the label of the edge to projectpublic HadoopPipeline groupCount()
public HadoopPipeline groupCount(String keyClosure)
public HadoopPipeline groupCount(String keyClosure, String valueClosure)
public HadoopPipeline drop()
public HadoopPipeline keep()
public HadoopPipeline script(String scriptUri, String... args)
public HadoopPipeline count()
public int submit()
throws Exception
Exceptionpublic int submit(String script, Boolean showHeader) throws Exception
script - the Gremlin scriptshowHeader - the Titan/Hadoop headerExceptionpublic HadoopGraph getGraph()
public HadoopCompiler getCompiler()
Copyright © 2012–2016. All rights reserved.