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


Java VertexProgram.getMemoryComputeKeys方法代码示例

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


在下文中一共展示了VertexProgram.getMemoryComputeKeys方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GraknSparkMemory

import org.apache.tinkerpop.gremlin.process.computer.VertexProgram; //导入方法依赖的package包/类
public GraknSparkMemory(final VertexProgram<?> vertexProgram,
                        final Set<MapReduce> mapReducers,
                        final JavaSparkContext sparkContext) {
    if (null != vertexProgram) {
        for (final MemoryComputeKey key : vertexProgram.getMemoryComputeKeys()) {
            this.memoryComputeKeys.put(key.getKey(), key);
        }
    }
    for (final MapReduce mapReduce : mapReducers) {
        this.memoryComputeKeys.put(
                mapReduce.getMemoryKey(),
                MemoryComputeKey.of(mapReduce.getMemoryKey(), Operator.assign, false, false));
    }
    for (final MemoryComputeKey memoryComputeKey : this.memoryComputeKeys.values()) {
        this.sparkMemory.put(
                memoryComputeKey.getKey(),
                sparkContext.accumulator(ObjectWritable.empty(), memoryComputeKey.getKey(),
                        new MemoryAccumulator<>(memoryComputeKey)));
    }
    this.broadcast = sparkContext.broadcast(Collections.emptyMap());
}
 
开发者ID:graknlabs,项目名称:grakn,代码行数:22,代码来源:GraknSparkMemory.java

示例2: SparkMemory

import org.apache.tinkerpop.gremlin.process.computer.VertexProgram; //导入方法依赖的package包/类
public SparkMemory(final VertexProgram<?> vertexProgram, final Set<MapReduce> mapReducers, final JavaSparkContext sparkContext) {
    if (null != vertexProgram) {
        for (final MemoryComputeKey key : vertexProgram.getMemoryComputeKeys()) {
            this.memoryComputeKeys.put(key.getKey(), key);
        }
    }
    for (final MapReduce mapReduce : mapReducers) {
        this.memoryComputeKeys.put(mapReduce.getMemoryKey(), MemoryComputeKey.of(mapReduce.getMemoryKey(), Operator.assign, false, false));
    }
    for (final MemoryComputeKey memoryComputeKey : this.memoryComputeKeys.values()) {
        this.sparkMemory.put(
                memoryComputeKey.getKey(),
                sparkContext.accumulator(ObjectWritable.empty(), memoryComputeKey.getKey(), new MemoryAccumulator<>(memoryComputeKey)));
    }
    this.broadcast = sparkContext.broadcast(Collections.emptyMap());
}
 
开发者ID:PKUSilvester,项目名称:LiteGraph,代码行数:17,代码来源:SparkMemory.java

示例3: TinkerMemory

import org.apache.tinkerpop.gremlin.process.computer.VertexProgram; //导入方法依赖的package包/类
public TinkerMemory(final VertexProgram<?> vertexProgram, final Set<MapReduce> mapReducers) {
    this.currentMap = new ConcurrentHashMap<>();
    this.previousMap = new ConcurrentHashMap<>();
    if (null != vertexProgram) {
        for (final MemoryComputeKey memoryComputeKey : vertexProgram.getMemoryComputeKeys()) {
            this.memoryKeys.put(memoryComputeKey.getKey(), memoryComputeKey);
        }
    }
    for (final MapReduce mapReduce : mapReducers) {
        this.memoryKeys.put(mapReduce.getMemoryKey(), MemoryComputeKey.of(mapReduce.getMemoryKey(), Operator.assign, false, false));
    }
}
 
开发者ID:ShiftLeftSecurity,项目名称:tinkergraph-gremlin,代码行数:13,代码来源:TinkerMemory.java

示例4: FulgoraMemory

import org.apache.tinkerpop.gremlin.process.computer.VertexProgram; //导入方法依赖的package包/类
public FulgoraMemory(final VertexProgram<?> vertexProgram, final Set<MapReduce> mapReducers) {
    this.currentMap = new ConcurrentHashMap<>();
    this.previousMap = new ConcurrentHashMap<>();
    if (null != vertexProgram) {
        for (final String key : vertexProgram.getMemoryComputeKeys()) {
            MemoryHelper.validateKey(key);
            this.memoryKeys.add(key);
        }
    }
    for (final MapReduce mapReduce : mapReducers) {
        this.memoryKeys.add(mapReduce.getMemoryKey());
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:14,代码来源:FulgoraMemory.java

示例5: DuctileMemory

import org.apache.tinkerpop.gremlin.process.computer.VertexProgram; //导入方法依赖的package包/类
public DuctileMemory(VertexProgram<M> vertexProgram, Set<MapReduce<?, ?, ?, ?, R>> mapReducers) {
if (null != vertexProgram) {
    for (MemoryComputeKey key : vertexProgram.getMemoryComputeKeys()) {
	// FIXME MemoryHelper.validateKey(key);
	memoryKeys.add(key);
    }
}
for (MapReduce<?, ?, ?, ?, R> mapReduce : mapReducers) {
    // FIXME memoryKeys.add(mapReduce.getMemoryKey());
}
   }
 
开发者ID:PureSolTechnologies,项目名称:DuctileDB,代码行数:12,代码来源:DuctileMemory.java


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