Class GraphComputerTest.BadGraphComputer
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.process.computer.GraphComputerTest.BadGraphComputer
-
- All Implemented Interfaces:
GraphComputer
- Enclosing class:
- GraphComputerTest
public static class GraphComputerTest.BadGraphComputer extends Object implements GraphComputer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.computer.GraphComputer
GraphComputer.Exceptions, GraphComputer.Features, GraphComputer.Persist, GraphComputer.ResultGraph
-
-
Constructor Summary
Constructors Constructor Description BadGraphComputer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphComputerconfigure(String key, Object value)Set an arbitrary configuration key/value for the underlyingConfigurationin theGraphComputer.GraphComputeredges(Traversal<Vertex,Edge> edgeFilter)Add a filter that will limit which edges of the vertices are loaded from the graph source.GraphComputer.Featuresfeatures()GraphComputermapReduce(MapReduce mapReduce)Add aMapReducejob to the set of MapReduce jobs to be executed by theGraphComputer.GraphComputerpersist(GraphComputer.Persist persist)Set theGraphComputer.Persistlevel of the computation.GraphComputerprogram(VertexProgram vertexProgram)Set theVertexProgramto be executed by theGraphComputer.GraphComputerresult(GraphComputer.ResultGraph resultGraph)Set theGraphComputer.ResultGraphof the computation.Future<ComputerResult>submit()GraphComputervertexProperties(Traversal<Vertex,? extends Property<?>> vertexPropertyFilter)Add a filter that will limit which vertex properties are loaded from the graph source.GraphComputervertices(Traversal<Vertex,Vertex> vertexFilter)Add a filter that will limit which vertices are loaded from the graph source.GraphComputerworkers(int workers)Set the desired number of workers to execute theVertexProgramandMapReducejobs.
-
-
-
Method Detail
-
result
public GraphComputer result(GraphComputer.ResultGraph resultGraph)
Description copied from interface:GraphComputerSet theGraphComputer.ResultGraphof the computation. If this is not set explicitly by the user, then theVertexProgramcan choose the most efficient result for its intended use. If there is no declared vertex program, then theGraphComputerdefaults toGraphComputer.ResultGraph.ORIGINAL.- Specified by:
resultin interfaceGraphComputer- Parameters:
resultGraph- the type of graph to be returned byComputerResult.graph()- Returns:
- the updated GraphComputer with newly set result graph
-
persist
public GraphComputer persist(GraphComputer.Persist persist)
Description copied from interface:GraphComputerSet theGraphComputer.Persistlevel of the computation. If this is not set explicitly by the user, then the\VertexProgramcan choose the most efficient persist for the its intended use. If there is no declared vertex program, then theGraphComputerdefaults toGraphComputer.Persist.NOTHING.- Specified by:
persistin interfaceGraphComputer- Parameters:
persist- the persistence level of the resultant computation- Returns:
- the updated GraphComputer with newly set persist
-
program
public GraphComputer program(VertexProgram vertexProgram)
Description copied from interface:GraphComputerSet theVertexProgramto be executed by theGraphComputer. There can only be one VertexProgram for the GraphComputer.- Specified by:
programin interfaceGraphComputer- Parameters:
vertexProgram- the VertexProgram to be executed- Returns:
- the updated GraphComputer with newly set VertexProgram
-
mapReduce
public GraphComputer mapReduce(MapReduce mapReduce)
Description copied from interface:GraphComputerAdd aMapReducejob to the set of MapReduce jobs to be executed by theGraphComputer. There can be any number of MapReduce jobs.- Specified by:
mapReducein interfaceGraphComputer- Parameters:
mapReduce- the MapReduce job to add to the computation- Returns:
- the updated GraphComputer with newly added MapReduce job
-
workers
public GraphComputer workers(int workers)
Description copied from interface:GraphComputerSet the desired number of workers to execute theVertexProgramandMapReducejobs. This is a recommendation to the underlyingGraphComputerimplementation and is allowed to deviate accordingly by the implementation.- Specified by:
workersin interfaceGraphComputer- Parameters:
workers- the number of workers to execute the submission- Returns:
- the updated GraphComputer with newly set worker count
-
vertices
public GraphComputer vertices(Traversal<Vertex,Vertex> vertexFilter)
Description copied from interface:GraphComputerAdd a filter that will limit which vertices are loaded from the graph source. The providedTraversalcan only check the vertex, its vertex properties, and the vertex property properties. The loaded graph will only have those vertices that pass through the provided filter.- Specified by:
verticesin interfaceGraphComputer- Parameters:
vertexFilter- the traversal to verify whether or not to load the current vertex- Returns:
- the updated GraphComputer with newly set vertex filter
-
edges
public GraphComputer edges(Traversal<Vertex,Edge> edgeFilter)
Description copied from interface:GraphComputerAdd a filter that will limit which edges of the vertices are loaded from the graph source. The providedTraversalcan only check the local star graph of the vertex and thus, can not access properties/labels of the adjacent vertices. The vertices of the loaded graph will only have those edges that pass through the provided filter.- Specified by:
edgesin interfaceGraphComputer- Parameters:
edgeFilter- the traversal that determines which edges are loaded for each vertex- Returns:
- the updated GraphComputer with newly set edge filter
-
vertexProperties
public GraphComputer vertexProperties(Traversal<Vertex,? extends Property<?>> vertexPropertyFilter)
Description copied from interface:GraphComputerAdd a filter that will limit which vertex properties are loaded from the graph source. The loaded vertices will only have those properties that pass through the provided filter. To drop all vertex properties, provide a traversal like __.properties("dummy") where "dummy" is not a valid vertex property.- Specified by:
vertexPropertiesin interfaceGraphComputer- Parameters:
vertexPropertyFilter- the traversal that determines which vertex properties are loaded for each vertex- Returns:
- the updated GraphComputer with newly set vertex property filter
-
configure
public GraphComputer configure(String key, Object value)
Description copied from interface:GraphComputerSet an arbitrary configuration key/value for the underlyingConfigurationin theGraphComputer. Typically, the other fluent methods inGraphComputershould be used to configure the computation. However, for some custom configuration in the underlying engine, this method should be used. Different GraphComputer implementations will have different key/values and thus, parameters placed here are generally not universal to all GraphComputer implementations. The default implementation simply does nothing and returns theGraphComputerunchanged.- Specified by:
configurein interfaceGraphComputer- Parameters:
key- the key of the configurationvalue- the value of the configuration- Returns:
- the updated GraphComputer with newly set key/value configuration
-
submit
public Future<ComputerResult> submit()
Description copied from interface:GraphComputer- Specified by:
submitin interfaceGraphComputer- Returns:
- a
Futuredenoting a reference to the asynchronous computation and where to get theDefaultComputerResultwhen its is complete.
-
features
public GraphComputer.Features features()
- Specified by:
featuresin interfaceGraphComputer
-
-