当前位置: 首页>>代码示例>>Java>>正文


Java GraphComputer.Persist方法代码示例

本文整理汇总了Java中org.apache.tinkerpop.gremlin.process.computer.GraphComputer.Persist方法的典型用法代码示例。如果您正苦于以下问题:Java GraphComputer.Persist方法的具体用法?Java GraphComputer.Persist怎么用?Java GraphComputer.Persist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tinkerpop.gremlin.process.computer.GraphComputer的用法示例。


在下文中一共展示了GraphComputer.Persist方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:15,代码来源:InputOutputHelper.java

示例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);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:11,代码来源:InputOutputHelper.java

示例3: getPreferredPersist

import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public GraphComputer.Persist getPreferredPersist() {
    return GraphComputer.Persist.NOTHING;
}
 
开发者ID:graknlabs,项目名称:grakn,代码行数:5,代码来源:GraknVertexProgram.java

示例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);
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:5,代码来源:CommonFileOutputFormat.java

示例5: getPreferredPersist

import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public GraphComputer.Persist getPreferredPersist() {
    return GraphComputer.Persist.VERTEX_PROPERTIES;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:5,代码来源:PageRankVertexProgram.java

示例6: getPersistState

import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
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;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:4,代码来源:GraphComputerHelper.java

示例7: getPreferredPersist

import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
@Override
public GraphComputer.Persist getPreferredPersist() {
    return GraphComputer.Persist.EDGES;
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:5,代码来源:BulkDumperVertexProgram.java

示例8: supportsResultGraphPersistCombination

import org.apache.tinkerpop.gremlin.process.computer.GraphComputer; //导入方法依赖的package包/类
public boolean supportsResultGraphPersistCombination(final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist); 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:2,代码来源:PersistResultGraphAware.java


注:本文中的org.apache.tinkerpop.gremlin.process.computer.GraphComputer.Persist方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。