RepartitionProcessor implements Distributable
Read onlyYes
FinalYes
One batch per key; past the memory limit, input is bucketed and grouped per bucket.
Interfaces
- Distributable
- Unlike a Transformer, receives the whole upstream generator, not one batch.
Properties
Methods
- __construct() : mixed
- bind() : BoundStep<string|int, Processor>
- breaks() : bool
- True when process() needs every input row before it emits one: the processor ends its pipeline.
- concatenated() : Generator<string|int, Rows>
- The held batches as one, so each key is gathered once rather than once per batch.
- describe() : null|Description
- null when the random value generator or the bucketing config does not describe.
- distribution() : Distribution|null
- null when it does not describe.
- fromDescription() : static
- process() : Generator<string|int, Rows>
- Process a stream of Rows and return a new stream.
Properties
$by
public
References
$by
$config
public
BucketingConfig
$config
Methods
__construct()
public
__construct(References $by, BucketingConfig $config, RandomValueGenerator $random) : mixed
Parameters
- $by : References
- $config : BucketingConfig
- $random : RandomValueGenerator
bind()
public
bind(Schema $input) : BoundStep<string|int, Processor>
Parameters
- $input : Schema
Return values
BoundStep<string|int, Processor>breaks()
True when process() needs every input row before it emits one: the processor ends its pipeline.
public
breaks() : bool
Return values
boolconcatenated()
The held batches as one, so each key is gathered once rather than once per batch.
public
concatenated(array<int, Rows> $batches, Backend $backend) : Generator<string|int, Rows>
Parameters
Return values
Generator<string|int, Rows>describe()
null when the random value generator or the bucketing config does not describe.
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
distribution()
null when it does not describe.
public
distribution() : Distribution|null
Return values
Distribution|nullfromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticprocess()
Process a stream of Rows and return a new stream.
public
process(Generator<string|int, Rows> $rows, Backend $backend) : Generator<string|int, Rows>