Apache Parquet

Apache Parquet is a free and open-source column-oriented data storage format of the Apache Hadoop ecosystem. It is similar to the other columnar-storage file formats available in Hadoop namely RCFile and ORC. It is compatible with most of the data processing frameworks in the Hadoop environment. It provides efficient data compression and encoding schemes with enhanced performance to handle complex data in bulk.

Apache Parquet
Initial release13 March 2013 (2013-03-13)
Stable release
2.8.0 / 13 January 2020 (2020-01-13)[1]
Repository
Written inJava (reference implementation)[2]
Operating systemCross-platform
TypeColumn-oriented DBMS
LicenseApache License 2.0
Websiteparquet.apache.org

History

The open-source project to build Apache Parquet began as a joint effort between Twitter[3] and Cloudera.[4] Parquet was designed as an improvement upon the Trevni columnar storage format created by Hadoop creator Doug Cutting. The first versionApache Parquet 1.0was released in July 2013. Since April 27, 2015, Apache Parquet is a top-level Apache Software Foundation (ASF)-sponsored project.[5][6]

Features

Apache Parquet is implemented using the record-shredding and assembly algorithm,[7] which accommodates the complex data structures that can be used to store the data.[8] The values in each column are physically stored in contiguous memory locations and this columnar storage provides the following benefits:[9]

  • Column-wise compression is efficient and saves storage space
  • Compression techniques specific to a type can be applied as the column values tend to be of the same type
  • Queries that fetch specific column values need not read the entire row data thus improving performance
  • Different encoding techniques can be applied to different columns

Apache Parquet is implemented using the Apache Thrift framework which increases its flexibility; it can work with a number of programming languages like C++, Java, Python, PHP, etc.[10]

As of August 2015,[11] Parquet supports the big-data-processing frameworks including Apache Hive, Apache Drill, Apache Impala, Apache Crunch, Apache Pig, Cascading, Presto and Apache Spark.

Compression and encoding

In Parquet, compression is performed column by column, which enables different encoding schemes to be used for text and integer data. This strategy also keeps the door open for newer and better encoding schemes to be implemented as they are invented.

Dictionary encoding

Parquet has an automatic dictionary encoding enabled dynamically for data with a small number of unique values (i.e. below 105) that enables significant compression and boosts processing speed.[12]

Bit packing

Storage of integers is usually done with dedicated 32 or 64 bits per integer. For small integers, packing multiple integers into the same space makes storage more efficient.[12]

Run-length encoding (RLE)

To optimize storage of multiple occurrences of the same value, a single value is stored once along with the number of occurrences.[12]

Parquet implements a hybrid of bit packing and RLE, in which the encoding switches based on which produces the best compression results. This strategy works well for certain types of integer data and combines well with dictionary encoding.[12]

Comparison

Apache Parquet is comparable to RCFile and Optimized Row Columnar (ORC) file formats---all three fall under the category of columnar data storage within the Hadoop ecosystem. They all have better compression and encoding with improved read performance at the cost of slower writes. In addition to these features, Apache Parquet supports limited schema evolution, i.e., the schema can be modified according to the changes in the data. It also provides the ability to add new columns and merge schemas that don't conflict.

gollark: I think so.
gollark: Does it support Lin-UX?
gollark: Good idea. Will add.
gollark: *needs extra monitor*
gollark: I prefer to write OSes in scratch.

See also

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.