Creating operators that can be either parallel or sequential

You can design an operator to execute in parallel or sequential mode.

If you want the operator to support both execution modes, you must omit the call to setKind() within describeOperator() and allow it to default to parallel. The user of an operator can then specify the execution mode of the operator as either parallel or sequential.

If you allow the user to set the execution mode of the operator, you must also use the default partitioning and collecting method of any for the operator. Any is the default method when the preserve-partioning flag is not set. The Any method allows the user to set both the execution mode of the operator and its partitioning method (for parallel execution) or collection method (for sequential execution) when the job containing the operator is designed.