v7.0.0
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: 063fcc5JobBuilder: 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.