Codota Logo
VertexProgram.execute
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
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

  • Finding current android device location
  • getSystemService (Context)
  • findViewById (Activity)
  • addToBackStack (FragmentTransaction)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JFileChooser (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now