easy-batch v7.0.0 Release Notes

Release Date: 2020-09-24 // about 3 years ago
  • 🚀 This release is a major version as it requires Java 11 or above. The main theme for this release is API type safety. There are no new features in this version except updating all APIs to be generic:

    • RecordReader (and its listener): 7ed62a5
    • Batch (and its listener): ba60977
    • RecordWriter (and its listener): d437aa5
    • RecordProcessor (and its listener / sub interfaces): 279ed29
    • Predicate: 063fcc5
    • 👷 JobBuilder: 6929936

    ⚡️ These changes require updating job definitions to use generics for input/output types in order to enforce the correctness and coherence of expected types between the record reader and writer (More details about this in issue #388).

    Migration guide from v6.1 to v7.0

    ⚡️ 1. Job definition updates

    🚀 The most notable change required by this release is regarding job definitions:

    --Job job = new JobBuilder() // v6++Job job = new JobBuilder\<String, Tweet\>() // v7 // define batch components .build();

    ⚠ Specifying input/output types is not mandatory, but not doing so will lead to a raw type usage warning.

    ⚡️ 2. RecordProcessor generic types updates

    🛰 Another important change has been introduced in this release about the generic type of RecordProcessor. In v6, the generic types of RecordProcessor were the types of input/output records. In v7, generic types now represent the type of the payload of input/output records:

    --public interface RecordProcessor\<I extends Record, O extends Record\> { // v6-- O processRecord(I record) throws Exception;--}++public interface RecordProcessor\<I, O\> { // v7++ Record\<O\> processRecord(Record\<I\> record) throws Exception; ++}

    This change has a direct impact on all interfaces extending RecordProcessor (like RecordFilter, RecordMapper, RecordMarshaller and RecordValidator) and their corresponding implementations.

    ⚡️ 3. Other API updates

    ⚡️ Any usage of the aforementioned APIs (RecordReader, RecordWriter, Batch, etc) and their associated listeners should be updated to use generics where appropriate.

    🗄 4. Deprecated APIs removal

    🚀 All deprecated APIs in v6.0 and v6.1 have been removed in this major release. The suggested replacement (if any) should be found in the Javdoc of the deprecated API.

Previous changes from v6.1.0

  • 🚀 This is a minor release which can be used as a drop-in replacement for v6.0.0. Here are the major changes:

    🆕 New Features and enhancements

    • Issue #368: Add RetryableRecordProcessor implementation
    • 0️⃣ Issue #381: Add default methods in record reader/writer interfaces

    🐛 Bug fixes

    • Issue #372: BeanPropertiesPreparedStatementProvider is failing to prepare statement if bean properties has null value

    🗄 Deprecations

    • 🗄 Issue #380: Deprecate the static factory method JobBuilder#aNewJob
    • 🗄 Issue #379: Deprecate ContentBasedBlockingQueueRecordWriterBuilder