Java Code Examples for org.apache.tinkerpop.gremlin.process.computer.GraphComputer#Persist
The following examples show how to use
org.apache.tinkerpop.gremlin.process.computer.GraphComputer#Persist .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InputOutputHelper.java From tinkerpop with Apache License 2.0 | 5 votes |
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(hadoopConfiguration); if (resultGraph.equals(GraphComputer.ResultGraph.NEW)) { newConfiguration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, hadoopConfiguration.getOutputLocation()); if (hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER_HAS_EDGES, persist.equals(GraphComputer.Persist.EDGES)); } newConfiguration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, hadoopConfiguration.getOutputLocation() + "/_"); return HadoopGraph.open(newConfiguration); }
Example 2
Source File: InputOutputHelper.java From tinkerpop with Apache License 2.0 | 5 votes |
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration); final BaseConfiguration newConfiguration = new BaseConfiguration(); newConfiguration.copy(org.apache.tinkerpop.gremlin.hadoop.structure.io.InputOutputHelper.getOutputGraph(configuration, resultGraph, persist).configuration()); if (resultGraph.equals(GraphComputer.ResultGraph.NEW) && hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) { if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter())) newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName()); } return HadoopGraph.open(newConfiguration); }
Example 3
Source File: GraknVertexProgram.java From grakn with GNU Affero General Public License v3.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.NOTHING; }
Example 4
Source File: PageRankVertexProgram.java From titan1withtp3.1 with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.VERTEX_PROPERTIES; }
Example 5
Source File: ShortestDistanceVertexProgram.java From titan1withtp3.1 with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.VERTEX_PROPERTIES; }
Example 6
Source File: CommonFileOutputFormat.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { return persist.equals(GraphComputer.Persist.NOTHING) || resultGraph.equals(GraphComputer.ResultGraph.NEW); }
Example 7
Source File: PageRankVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.VERTEX_PROPERTIES; }
Example 8
Source File: ConnectedComponentVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.VERTEX_PROPERTIES; }
Example 9
Source File: PeerPressureVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.VERTEX_PROPERTIES; }
Example 10
Source File: ShortestPathVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.NOTHING; }
Example 11
Source File: TraversalVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.NOTHING; }
Example 12
Source File: CloneVertexProgram.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.EDGES; }
Example 13
Source File: GraphComputerHelper.java From tinkerpop with Apache License 2.0 | 4 votes |
public static GraphComputer.Persist getPersistState(final Optional<VertexProgram> vertexProgram, final Optional<GraphComputer.Persist> persist) { return persist.isPresent() ? persist.get() : vertexProgram.isPresent() ? vertexProgram.get().getPreferredPersist() : GraphComputer.Persist.NOTHING; }
Example 14
Source File: ProgramTest.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public GraphComputer.Persist getPreferredPersist() { return GraphComputer.Persist.EDGES; }
Example 15
Source File: PersistedOutputRDD.java From tinkerpop with Apache License 2.0 | 4 votes |
@Override public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) { return persist.equals(GraphComputer.Persist.NOTHING) || resultGraph.equals(GraphComputer.ResultGraph.NEW); }
Example 16
Source File: PersistResultGraphAware.java From tinkerpop with Apache License 2.0 | votes |
public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist);