Class InitContext<CONFIG extends PregelConfig>


  • public final class InitContext<CONFIG extends PregelConfig>
    extends NodeCentricContext<CONFIG>
    A context that is used during the initialization phase, which is before the first superstep is being executed. The init context allows accessing node properties from the input graph which can be used to set initial node values for the Pregel computation.
    • Method Detail

      • nodePropertyKeys

        public java.util.Set<java.lang.String> nodePropertyKeys()
        Returns the node property keys stored in the input graph. These properties can be the result of previous computations or part of node projections when creating the graph.
      • nodeProperties

        public NodeProperties nodeProperties​(java.lang.String key)
        Returns the property values for the given property key. Property values can be used to access individual node property values by using their node identifier.