本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.computer.GraphComputer.ResultGraph方法的典型用法代码示例。如果您正苦于以下问题:Java GraphComputer.ResultGraph方法的具体用法?Java GraphComputer.ResultGraph怎么用?Java GraphComputer.ResultGraph使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tinkerpop.gremlin.process.computer.GraphComputer
的用法示例。
在下文中一共展示了GraphComputer.ResultGraph方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOutputGraph
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
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);
}
示例2: getOutputGraph
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
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);
}
示例3: getPreferredResultGraph
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public GraphComputer.ResultGraph getPreferredResultGraph() {
return GraphComputer.ResultGraph.ORIGINAL;
}
示例4: supportsResultGraphPersistCombination
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) {
return persist.equals(GraphComputer.Persist.NOTHING) || resultGraph.equals(GraphComputer.ResultGraph.NEW);
}
示例5: getPreferredResultGraph
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public GraphComputer.ResultGraph getPreferredResultGraph() {
return GraphComputer.ResultGraph.NEW;
}
示例6: getResultGraphState
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
public static GraphComputer.ResultGraph getResultGraphState(final Optional<VertexProgram> vertexProgram, final Optional<GraphComputer.ResultGraph> resultGraph) {
return resultGraph.isPresent() ? resultGraph.get() : vertexProgram.isPresent() ? vertexProgram.get().getPreferredResultGraph() : GraphComputer.ResultGraph.ORIGINAL;
}
示例7: supportsResultGraphPersistCombination
import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist);