- All Implemented Interfaces:
- Enclosing class:
public static enum Edge.RoutingPolicy extends Enum<Edge.RoutingPolicy> implements Serializable
An edge describes a connection from many upstream processors to many downstream processors. The routing policy decides where exactly to route each particular item emitted from an upstream processor. To simplify the reasoning we introduce the concept of the set of candidate downstream processors, or the candidate set for short. On a local edge the candidate set contains only local processors and on a distributed edge it contain all the processors.
Nested Class Summary
Enum Constant Summary
Enum Constants Enum Constant DescriptionEach item is sent to all candidate processors.Like
UNICAST, but guarantees that any given downstream processor receives data from exactly one upstream processor.Each item is sent to the one processor responsible for the item's partition ID.For each item a single destination processor is chosen from the candidate set, with no restriction on the choice.
Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Enum Constant Details
UNICASTpublic static final Edge.RoutingPolicy UNICASTFor each item a single destination processor is chosen from the candidate set, with no restriction on the choice.
ISOLATEDpublic static final Edge.RoutingPolicy ISOLATEDLike
UNICAST, but guarantees that any given downstream processor receives data from exactly one upstream processor. This is needed in some DAG setups to apply selective backpressure to individual upstream source processors.
The downstream's local parallelism must not be less than the upstream's. This policy is only available on a local edge.
PARTITIONEDpublic static final Edge.RoutingPolicy PARTITIONEDEach item is sent to the one processor responsible for the item's partition ID. On a distributed edge the processor is unique across the cluster; on a non-distributed edge the processor is unique only within a member.
BROADCASTpublic static final Edge.RoutingPolicy BROADCASTEach item is sent to all candidate processors.
valuespublic static Edge.RoutingPolicy values()Returns an array containing the constants of this enum type, in the order they are declared.
- an array containing the constants of this enum type, in the order they are declared
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)