Flow PHP

PageHeader

Properties

$_TSPEC  : mixed
$compressed_page_size  : int
Compressed (and potentially encrypted) page size in bytes, not including this header *.
$crc  : int
The 32-bit CRC checksum for the page, to be be calculated as follows:
$data_page_header  : DataPageHeader
$data_page_header_v2  : DataPageHeaderV2
$dictionary_page_header  : DictionaryPageHeader
$index_page_header  : IndexPageHeader
$isValidate  : mixed
$type  : int
the type of the page: indicates which of the *_header fields is set *.
$uncompressed_page_size  : int
Uncompressed page size in bytes (not including this header) *.

Methods

__construct()  : mixed
getName()  : mixed
read()  : mixed
write()  : mixed

Properties

$_TSPEC

public static mixed $_TSPEC = [1 => ['var' => 'type', 'isRequired' => true, 'type' => \Thrift\Type\TType::I32, 'class' => '\Flow\Parquet\Thrift\PageType'], 2 => ['var' => 'uncompressed_page_size', 'isRequired' => true, 'type' => \Thrift\Type\TType::I32], 3 => ['var' => 'compressed_page_size', 'isRequired' => true, 'type' => \Thrift\Type\TType::I32], 4 => ['var' => 'crc', 'isRequired' => false, 'type' => \Thrift\Type\TType::I32], 5 => ['var' => 'data_page_header', 'isRequired' => false, 'type' => \Thrift\Type\TType::STRUCT, 'class' => '\Flow\Parquet\Thrift\DataPageHeader'], 6 => ['var' => 'index_page_header', 'isRequired' => false, 'type' => \Thrift\Type\TType::STRUCT, 'class' => '\Flow\Parquet\Thrift\IndexPageHeader'], 7 => ['var' => 'dictionary_page_header', 'isRequired' => false, 'type' => \Thrift\Type\TType::STRUCT, 'class' => '\Flow\Parquet\Thrift\DictionaryPageHeader'], 8 => ['var' => 'data_page_header_v2', 'isRequired' => false, 'type' => \Thrift\Type\TType::STRUCT, 'class' => '\Flow\Parquet\Thrift\DataPageHeaderV2']]

$compressed_page_size

Compressed (and potentially encrypted) page size in bytes, not including this header *.

public int $compressed_page_size

$crc

The 32-bit CRC checksum for the page, to be be calculated as follows:

public int $crc
  • The standard CRC32 algorithm is used (with polynomial 0x04C11DB7, the same as in e.g. GZip).
  • All page types can have a CRC (v1 and v2 data pages, dictionary pages, etc.).
  • The CRC is computed on the serialization binary representation of the page (as written to disk), excluding the page header. For example, for v1 data pages, the CRC is computed on the concatenation of repetition levels, definition levels and column values (optionally compressed, optionally encrypted).
  • The CRC computation therefore takes place after any compression and encryption steps, if any.

If enabled, this allows for disabling checksumming in HDFS if only a few pages need to be read.

$isValidate

public static mixed $isValidate = false

$type

the type of the page: indicates which of the *_header fields is set *.

public int $type

$uncompressed_page_size

Uncompressed page size in bytes (not including this header) *.

public int $uncompressed_page_size

Methods

__construct()

public __construct([mixed $vals = null ]) : mixed
Parameters
$vals : mixed = null

read()

public read(mixed $input) : mixed
Parameters
$input : mixed

write()

public write(mixed $output) : mixed
Parameters
$output : mixed

        
On this page

Search results