Low‐level helpers exposing the RecordIO record format.
Types
Name |
Description |
A record and the file id it was written with. |
Functions
Name |
Description |
|
|
Header size. |
|
Write a header in the buffer. We will prepend the header to the front of the chain. Do not write the buffer if empty (we don't allow empty records). Returns the total length, including header (0 if empty) (same as buf‐>computeChainDataLength(), but likely faster) |
|
Check if there is a valid record at the beginning of range. This validates both record header and data and Returns the record data (not the header) if the record is valid, ByteRange() otherwise. |
|
Check if there Record Data is valid (to be used after validating the header separately) Returns the record data (not the header) if the record data is valid, ByteRange() otherwise. |
|
Check if the Record Header is valid at the beginning of range. Useful to check the validity of the header before building the entire record in IOBuf. If the record is from storage device (e.g. flash) then, it is better to make sure that the header is valid before reading the data from the storage device. Returns true if valid, false otherwise. |
Created with MrDocs