easy-batch v7.0.0 Release Notes
Release Date: 2020-09-24 // about 4 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): 7ed62a5Batch
(and its listener): ba60977RecordWriter
(and its listener): d437aa5RecordProcessor
(and its listener / sub interfaces): 279ed29Predicate
: 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 ofRecordProcessor
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
(likeRecordFilter
,RecordMapper
,RecordMarshaller
andRecordValidator
) 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 hasnull
value
๐ Deprecations
- Issue #368: Add