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.

Synopsis

Declared in <folly/io/RecordIO.h>

RecordInfo
validateRecord(
    ByteRange range,
    uint32_t fileId);

Return Value

The record data if valid, or an empty record.

Parameters

Name

Description

range

The range whose leading record is validated.

fileId

The file id to match, or 0 to match any.

Created with MrDocs