Tabnine Logo
VertexProgram.execute
Code IndexAdd Tabnine to your IDE (free)

How to use
execute
method
in
org.apache.tinkerpop.gremlin.process.computer.VertexProgram

Best Java code snippets using org.apache.tinkerpop.gremlin.process.computer.VertexProgram.execute (Showing top 9 results out of 315)

origin: thinkaurelius/titan

@Override
public void process(TitanVertex vertex, ScanMetrics metrics) {
  PreloadedVertex v = (PreloadedVertex)vertex;
  long vertexId = v.longId();
  VertexMemoryHandler<M> vh = new VertexMemoryHandler(vertexMemory,v);
  v.setAccessCheck(PreloadedVertex.OPENSTAR_CHECK);
  if (idManager.isPartitionedVertex(vertexId)) {
    if (idManager.isCanonicalVertexId(vertexId)) {
      EntryList results = v.getFromCache(SYSTEM_PROPS_QUERY);
      if (results == null) results = EntryList.EMPTY_LIST;
      vertexMemory.setLoadedProperties(vertexId,results);
    }
    for (MessageScope scope : vertexMemory.getPreviousScopes()) {
      if (scope instanceof MessageScope.Local) {
        M combinedMsg = null;
        for (Iterator<M> msgIter = vh.receiveMessages(scope).iterator(); msgIter.hasNext(); ) {
          M msg = msgIter.next();
          if (combinedMsg==null) combinedMsg=msg;
          else combinedMsg = combiner.combine(combinedMsg,msg);
        }
        if (combinedMsg!=null) vertexMemory.aggregateMessage(vertexId,combinedMsg,scope);
      }
    }
  } else {
    v.setPropertyMixing(vh);
    vertexProgram.execute(v, vh, memory);
  }
}
origin: JanusGraph/janusgraph

v.setPropertyMixing(vh);
try {
  vertexProgram.execute(v, vh, memory);
} catch (ReadOnlyTransactionException e) {
origin: apache/tinkerpop

final Vertex vertex = vertices.next();
if (Thread.interrupted()) throw new TraversalInterruptedException();
vertexProgram.execute(
    ComputerGraph.vertexProgram(vertex, vertexProgram),
    new TinkerMessenger<>(vertex, this.messageBoard, vertexProgram.getMessageCombiner()),
origin: apache/tinkerpop

workerVertexProgram.execute(ComputerGraph.vertexProgram(vertex, workerVertexProgram), messenger, memory); // execute the vertex program on this vertex for this iteration
origin: com.thinkaurelius.titan/titan-core

@Override
public void process(TitanVertex vertex, ScanMetrics metrics) {
  PreloadedVertex v = (PreloadedVertex)vertex;
  long vertexId = v.longId();
  VertexMemoryHandler<M> vh = new VertexMemoryHandler(vertexMemory,v);
  v.setAccessCheck(PreloadedVertex.OPENSTAR_CHECK);
  if (idManager.isPartitionedVertex(vertexId)) {
    if (idManager.isCanonicalVertexId(vertexId)) {
      EntryList results = v.getFromCache(SYSTEM_PROPS_QUERY);
      if (results == null) results = EntryList.EMPTY_LIST;
      vertexMemory.setLoadedProperties(vertexId,results);
    }
    for (MessageScope scope : vertexMemory.getPreviousScopes()) {
      if (scope instanceof MessageScope.Local) {
        M combinedMsg = null;
        for (Iterator<M> msgIter = vh.receiveMessages(scope).iterator(); msgIter.hasNext(); ) {
          M msg = msgIter.next();
          if (combinedMsg==null) combinedMsg=msg;
          else combinedMsg = combiner.combine(combinedMsg,msg);
        }
        if (combinedMsg!=null) vertexMemory.aggregateMessage(vertexId,combinedMsg,scope);
      }
    }
  } else {
    v.setPropertyMixing(vh);
    vertexProgram.execute(v, vh, memory);
  }
}
origin: org.apache.tinkerpop/tinkergraph-gremlin

final Vertex vertex = vertices.next();
if (Thread.interrupted()) throw new TraversalInterruptedException();
vertexProgram.execute(
    ComputerGraph.vertexProgram(vertex, vertexProgram),
    new TinkerMessenger<>(vertex, this.messageBoard, vertexProgram.getMessageCombiner()),
origin: io.shiftleft/tinkergraph-gremlin

final Vertex vertex = vertices.next();
if (Thread.interrupted()) throw new TraversalInterruptedException();
vertexProgram.execute(
    ComputerGraph.vertexProgram(vertex, vertexProgram),
    new TinkerMessenger<>(vertex, this.messageBoard, vertexProgram.getMessageCombiner()),
origin: org.apache.tinkerpop/spark-gremlin

workerVertexProgram.execute(ComputerGraph.vertexProgram(vertex, workerVertexProgram), messenger, memory); // execute the vertex program on this vertex for this iteration
origin: ai.grakn/grakn-kb

workerVertexProgram.execute(ComputerGraph.vertexProgram(vertex, workerVertexProgram), messenger, memory); // execute the vertex program on this vertex for this iteration
org.apache.tinkerpop.gremlin.process.computerVertexProgramexecute

Javadoc

This method denotes the main body of the computation and is executed on each vertex in the graph. This method is logically executed in parallel on all vertices in the graph. When the Memory is read, it is according to the aggregated state yielded in the previous iteration. When the Memory is written, the data will be aggregated at the end of the iteration for reading in the next iteration.

Popular methods of VertexProgram

  • getMemoryComputeKeys
    The Memory keys that will be used during the computation. These are the only keys that can be read o
  • workerIterationEnd
    This method is called at the end of each iteration of each "computational chunk." The set of vertice
  • workerIterationStart
    This method is called at the start of each iteration of each "computational chunk." The set of verti
  • createVertexProgram
    A helper method to construct a VertexProgram given the content of the supplied configuration. The cl
  • getMessageCombiner
    Combine the messages in route to a particular vertex. Useful to reduce the amount of data transmitte
  • getVertexComputeKeys
    The org.apache.tinkerpop.gremlin.structure.Element properties that will be mutated during the comput
  • setup
    The method is called at the beginning of the computation. The method is global to the GraphComputer
  • terminate
    The method is called at the end of each iteration to determine if the computation is complete. The m
  • getMapReducers
    The set of MapReduce jobs that are associated with the VertexProgram. This is not necessarily the ex
  • storeState
    When it is necessary to store the state of the VertexProgram, this method is called. This is typical
  • clone
    When multiple workers on a single machine need VertexProgram instances, it is possible to use clone.
  • getElementComputeKeys
  • clone,
  • getElementComputeKeys,
  • getMessageScopes,
  • loadState,
  • getFeatures,
  • getPreferredPersist,
  • getPreferredResultGraph,
  • getTraverserRequirements

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • putExtra (Intent)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now