package headerparsers
- Alphabetic
- Public
- All
Type Members
-
trait
RecordHeaderParser extends AnyRef
This trait represents a contract for record header parsers.
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 RecordHeaderParserA record header parser for RDW is implemented in
RecordHeaderParserRDW. This is a good starting point for implementing your own record header parser. -
class
RecordHeaderParserFixedLen extends Serializable with RecordHeaderParser
This is a parser for fixed length record files.
-
class
RecordHeaderParserRDW extends Serializable with RecordHeaderParser
This is a parser for records that contain 4 byte RDW headers.
-
case class
RecordMetadata(recordLength: Int, isValid: Boolean) extends Product with Serializable
Metadata required by record extractors to extract a record
Metadata required by record extractors to extract a record
- recordLength
The length of the record including header itself
- isValid
If false the parser will skip the record and will jump to the next one
Value Members
- object RecordHeaderParserFactory extends Logging