本文整理汇总了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());
}
示例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());
}
示例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));
}
}
示例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());
}
}
示例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());
}
}