Class Vertex

java.lang.Object
com.hazelcast.jet.core.Vertex
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

public class Vertex
extends Object
implements IdentifiedDataSerializable
Represents a unit of data processing in a Jet computation job. Conceptually, a vertex receives data items over its inbound edges and pushes data items to its outbound edges. Practically, a single vertex is represented by a set of instances of Processor. The localParallelism property determines the number of processor instances running on each cluster member.

Each processor is assigned a set of partition IDs it is responsible for. When an inbound edge is partitioned, the processor will receive only those data items whose partition ID it is responsible for. For data traveling over a partitioned edge which is also distributed, the whole cluster contains a single unique processor instance responsible for any given partition ID. For non-distributed edges, the processor is unique only within a member and each member has its own processor for any given partition ID. Finally, there is a guarantee of collation across all the partitioned edges impinging on a vertex: within each member, all the data with a given partition ID is received by the same processor.

A vertex is uniquely identified in a DAG by its name.

Since:
3.0
  • Field Details

  • Constructor Details

    • Vertex

      public Vertex​(@Nonnull String name, @Nonnull SupplierEx<? extends Processor> processorSupplier)
      Creates a vertex from a Supplier<Processor>.

      This is useful for vertices where all the Processor instances will be instantiated the same way.

      NOTE: this constructor should not be abused with a stateful implementation which produces a different processor each time. In such a case the full ProcessorSupplier type should be implemented.

      Parameters:
      name - the unique name of the vertex. This name identifies the vertex in the snapshot
      processorSupplier - the simple, parameterless supplier of Processor instances
    • Vertex

      public Vertex​(@Nonnull String name, @Nonnull ProcessorSupplier processorSupplier)
      Creates a vertex from a ProcessorSupplier.
      Parameters:
      name - the unique name of the vertex. This name identifies the vertex in the snapshot
      processorSupplier - the supplier of Processor instances which will be used on all members
    • Vertex

      public Vertex​(@Nonnull String name, @Nonnull ProcessorMetaSupplier metaSupplier)
      Creates a vertex from a ProcessorMetaSupplier.
      Parameters:
      name - the unique name of the vertex. This name identifies the vertex in the snapshot
      metaSupplier - the meta-supplier of ProcessorSuppliers for each member
  • Method Details