Packages

trait RecordHeaderParser extends AnyRef

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.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RecordHeaderParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getHeaderLength: Int

    Returns the length of the header sufficient to determine record's validity and size.

    Returns the length of the header sufficient to determine record's validity and size. Usually this is a constant number for a given record header flavor.

  2. abstract def getRecordMetadata(header: Array[Byte], fileOffset: Long, maxOffset: Long, fileSize: Long, recordNum: Long): RecordMetadata

    Given a raw values of a record header returns metadata sufficient to parse the record.

    Given a raw values of a record header returns metadata sufficient to parse the record.

    header

    A record header as an array of bytes

    fileOffset

    An offset from the beginning of the underlying file

    maxOffset

    A maximum offset allowed to read by the current index chunk

    fileSize

    A size of the underlying file

    recordNum

    A sequential record number

    returns

    A parsed record metadata

  3. abstract def isHeaderDefinedInCopybook: Boolean

    If true the record parser will expect record headers to be defined in the copybook itself.

    If true the record parser will expect record headers to be defined in the copybook itself. If false the headers are not expected to be defined in the copybook and the number of bytes returned by getHeaderLength will be truncated before record bytes are passed to the parser.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. def onReceiveAdditionalInfo(additionalInfo: String): Unit

    Clients of 'spark-cobol' can pass additional information to custom record header parsers using

    Clients of 'spark-cobol' can pass additional information to custom record header parsers using

    .option("rhp_additional_info", "...anything as a string...")

    If a client provides any additional info the method will be executed just after constructing the record header parser.

    Built-in record header parsers ignore the additional info. This info string is intended for custom record header parsers.

    additionalInfo

    A string provided by a client for the record header parser.

  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped