Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-2066

JobExecutor - afterGroup not called

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • All
    • Small

    Description

      We can use the Job executor, mainly for testing like:

              Job
                      .components() //
                      .component("emitter", "test://emitter") //
                      .component("out", "QA://AssertionOutput?" + "configuration.%24maxBatchSize=4&" + configStr) //
                      .connections() //
                      .from("emitter") //
                      .to("out") //
                      .build() //
                      .run();
      

      As you can see in the example, it is possible to add the $maxBatchSize parameter: https://github.com/Talend/component-runtime/blob/06ac75da48799c8b758b5a720c34d64f9a69cd23/component-runtime-manager/src/main/java/org/talend/sdk/component/runtime/manager/chain/internal/JobImpl.java#L354

      It is taken into account and by default it seems set to '1' since after group is called for each record.
      If we set a maxBatchSize greater than the number of records given into "handler.setInputData(records);", the afterGroup is never called.
      It is called if the maxBatchSize is lesser or equal to the number of record.
      Should be great to call it when all records are processed.

      Attachments

        Issue Links

          Activity

            People

              emmanuel_g emmanuel gallois
              ypiel Yves Piel
              Axel Catoire Axel Catoire
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: