This trait represents a contract for record header parsers.
This is a parser for fixed length record files.
This is a parser for records that contain 4 byte RDW headers.
Metadata required by record extractors to extract a record
Metadata required by record extractors to extract a record
The length of the record including header itself
If false the parser will skip the record and will jump to the next one
This trait represents a contract for record header parsers. Usually each record of a multi-segment mainframe file has a 4 byte record descriptor word (RDW) header specifying length of each record. If this RDW header is no-standard a custom header parser can be provided to Cobrix to extract such records.
To this you need to create a parser class that extends this trait and implement the header parser logic. Each concrete class inherited from this trait should be serializable because it need to be transferrable to executors when used from Spark framework.
So the usual way implementing a custom record header parser is
extends Serializable with RecordHeaderParser
A record header parser for RDW is implemented in
RecordHeaderParserRDW
. This is a good starting point for implementing your own record header parser.