Apache Parquet

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Apache Parquet
Stable release
1.9.0[1] / 19 October 2016; 2 years ago (2016-10-19)
Operating systemCross-platform
TypeDatabase management system
LicenseApache License 2.0
Websitehttps://parquet.apache.org

Apache Parquet is a free and open-source column-oriented data store of the Apache Hadoop ecosystem. It is similar to the other columnar-storage file formats available in Hadoop namely RCFile and Optimized RCFile. 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.

The open-source project to build Apache Parquet began as a joint effort between Twitter[2] and Cloudera.[3] The first version—Apache Parquet 1.0—was released in July 2013. Since April 27, 2015, Apache Parquet is a top-level Apache Software Foundation (ASF)-sponsored project.[4][5]

Features[edit]

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

  • 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 raw data thus improving performance
  • Different encoding techniques can be applied to different columns

Moreover, 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.[9]

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

Compression and encoding[edit]

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[edit]

Parquet has an automatic dictionary encoding enabled dynamically for data with a small number of unique values ( < 10^5 ) that enables significant compression and boosts processing speed.[11]

Bit packing[edit]

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.[11]

Run-length encoding (RLE)[edit]

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

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.[11]

Comparison[edit]

Apache Parquet is comparable to RCFile and Optimized RCFile (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.

See also[edit]

References[edit]

  1. ^ "Github releases".
  2. ^ "Release Date".
  3. ^ "Introducing Parquet: Efficient Columnar Storage for Apache Hadoop - Cloudera Engineering Blog". 2013-03-13. Retrieved 2018-10-22.
  4. ^ http://www.infoworld.com/article/2915565/big-data/apache-parquet-paves-the-way-towards-better-hadoop-data-storage.html
  5. ^ https://blogs.apache.org/foundation/entry/the_apache_software_foundation_announces75
  6. ^ "The striping and assembly algorithms from the Google-inspired Dremel paper". github. Retrieved 13 November 2017.
  7. ^ "Apache Parquet Documentation".
  8. ^ "Apache Parquet Cloudera".
  9. ^ "Apache Thrift".
  10. ^ "Supported Frameworks".
  11. ^ a b c d "Announcing Parquet 1.0: Columnar Storage for Hadoop | Twitter Blogs". blog.twitter.com. Retrieved 2016-09-14.

External links[edit]