Skip to content

merge-batch-stream : Cannot configure option batchSize in flux #782

Description

@TobiasNx

merge-batch-stream should have an option batchsize

* Merges a sequence of {@link #setBatchSize(long)} records. On a
* <i>close-stream</i> event, a record containing fewer source records may be
* created.

/**
* Sets the number of records that should be merged into a batch.
* <p>
* The default batch size is 1, wich means that no records are merged.
* <p>
* This parameter must not be changed during processing.
*
* @param batchSize the number of records that should be merged.
*/
public void setBatchSize(final long batchSize) {
this.batchSize = batchSize;
}

When trying to use it in a Flux, an exception is thrown:

"https://raw.githubusercontent.com/metafacture/metafacture-core/master/metafacture-runner/src/main/dist/examples/read/pica/10.pica"
| open-http
| as-lines
| decode-pica
| fix("retain('003@.a')")
| merge-batch-stream(batchSize="10")
| encode-formeta(style="multiline")
| print
;
org.metafacture.commons.reflection.ReflectionException: Method StreamBatchMerger.batchsize does not exist

Playground-Link

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions