• Stars
    star
    2,153
  • Rank 21,313 (Top 0.5 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apache Parquet

Parquet MR Build Status

Parquet-MR contains the java implementation of the Parquet format. Parquet is a columnar storage format for Hadoop; it provides efficient storage and encoding of data. Parquet uses the record shredding and assembly algorithm described in the Dremel paper to represent nested structures.

You can find some details about the format and intended use cases in our Hadoop Summit 2013 presentation

Building

Parquet-MR uses Maven to build and depends on the thrift compiler (protoc is now managed by maven plugin).

Install Thrift

To build and install the thrift compiler, run:

wget -nv http://archive.apache.org/dist/thrift/0.19.0/thrift-0.19.0.tar.gz
tar xzf thrift-0.19.0.tar.gz
cd thrift-0.19.0
chmod +x ./configure
./configure --disable-libs
sudo make install -j

If you're on OSX and use homebrew, you can instead install Thrift 0.19.0 with brew and ensure that it comes first in your PATH.

brew install thrift
export PATH="/usr/local/opt/[email protected]/bin:$PATH"

Build Parquet with Maven

Once protobuf and thrift are available in your path, you can build the project by running:

LC_ALL=C mvn clean install

Features

Parquet is a very active project, and new features are being added quickly. Here are a few features:

  • Type-specific encoding
  • Hive integration (deprecated)
  • Pig integration
  • Cascading integration (deprecated)
  • Crunch integration
  • Apache Arrow integration
  • Scrooge integration (deprecated)
  • Impala integration (non-nested)
  • Java Map/Reduce API
  • Native Avro support
  • Native Thrift support
  • Native Protocol Buffers support
  • Complex structure support
  • Run-length encoding (RLE)
  • Bit Packing
  • Adaptive dictionary encoding
  • Predicate pushdown
  • Column stats
  • Delta encoding
  • Index pages
  • Java Vector API support (experimental)

Java Vector API support

The feature is experimental and is currently not part of the parquet distribution. Parquet-MR has supported Java Vector API to speed up reading, to enable this feature:

  • Java 17+, 64-bit
  • Requiring the CPU to support instruction sets:
    • avx512vbmi
    • avx512_vbmi2
  • To build the jars: mvn clean package -P vector-plugins
  • For Apache Spark to enable this feature:
    • Build parquet and replace the parquet-encoding-{VERSION}.jar on the spark jars folder
    • Build parquet-encoding-vector and copy parquet-encoding-vector-{VERSION}.jar to the spark jars folder
    • Edit spark class#VectorizedRleValuesReader, function#readNextGroup refer to parquet class#ParquetReadRouter, function#readBatchUsing512Vector
    • Build spark with maven and replace spark-sql_2.12-{VERSION}.jar on the spark jars folder

Map/Reduce integration

Input and Output formats. Note that to use an Input or Output format, you need to implement a WriteSupport or ReadSupport class, which will implement the conversion of your object to and from a Parquet schema.

We've implemented this for 2 popular data formats to provide a clean migration path as well:

Thrift

Thrift integration is provided by the parquet-thrift sub-project.

Avro

Avro conversion is implemented via the parquet-avro sub-project.

Protobuf

Protobuf conversion is implemented via the parquet-protobuf sub-project.

Create your own objects

  • The ParquetOutputFormat can be provided a WriteSupport to write your own objects to an event based RecordConsumer.
  • the ParquetInputFormat can be provided a ReadSupport to materialize your own objects by implementing a RecordMaterializer

See the APIs:

Apache Pig integration

A Loader and a Storer are provided to read and write Parquet files with Apache Pig

Storing data into Parquet in Pig is simple:

-- options you might want to fiddle with
SET parquet.page.size 1048576 -- default. this is your min read/write unit.
SET parquet.block.size 134217728 -- default. your memory budget for buffering data
SET parquet.compression lzo -- or you can use none, gzip, snappy
STORE mydata into '/some/path' USING parquet.pig.ParquetStorer;

Reading in Pig is also simple:

mydata = LOAD '/some/path' USING parquet.pig.ParquetLoader();

If the data was stored using Pig, things will "just work". If the data was stored using another method, you will need to provide the Pig schema equivalent to the data you stored (you can also write the schema to the file footer while writing it -- but that's pretty advanced). We will provide a basic automatic schema conversion soon.

Hive integration

Hive integration is provided via the parquet-hive sub-project.

Hive integration is now deprecated within the Parquet project. It is now maintained by Apache Hive.

Build

To run the unit tests: mvn test

To build the jars: mvn package

The build runs in GitHub Actions: Build Status

Add Parquet as a dependency in Maven

The current release is version 1.13.0

  <dependencies>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-common</artifactId>
      <version>1.13.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-encoding</artifactId>
      <version>1.13.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>1.13.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>1.13.0</version>
    </dependency>
  </dependencies>

How To Contribute

We prefer to receive contributions in the form of GitHub pull requests. Please send pull requests against the parquet-mr Git repository. If you've previously forked Parquet from its old location, you will need to add a remote or update your origin remote to https://github.com/apache/parquet-mr.git

If you are looking for some ideas on what to contribute, check out jira issues for this project labeled "pick-me-up". Comment on the issue and/or contact [email protected] with your questions and ideas.

If youโ€™d like to report a bug but donโ€™t have time to fix it, you can still post it to our issue tracker, or email the mailing list [email protected]

To contribute a patch:

  1. Break your work into small, single-purpose patches if possible. Itโ€™s much harder to merge in a large change with a lot of disjoint features.
  2. Create a JIRA for your patch on the Parquet Project JIRA.
  3. Submit the patch as a GitHub pull request against the master branch. For a tutorial, see the GitHub guides on forking a repo and sending a pull request. Prefix your pull request name with the JIRA name (ex: #240).
  4. Make sure that your code passes the unit tests. You can run the tests with mvn test in the root directory.
  5. Add new unit tests for your code.

We tend to do fairly close readings of pull requests, and you may get a lot of comments. Some common issues that are not code structure related, but still important:

  • Use 2 spaces for whitespace. Not tabs, not 4 spaces. The number of the spacing shall be 2.
  • Give your operators some room. Not a+b but a + b and not foo(int a,int b) but foo(int a, int b).
  • Generally speaking, stick to the Sun Java Code Conventions
  • Make sure tests pass!

Thank you for getting involved!

Authors and contributors

Code of Conduct

We hold ourselves and the Parquet developer community to two codes of conduct:

  1. The Apache Software Foundation Code of Conduct
  2. The Twitter OSS Code of Conduct

Discussions

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

More Repositories

1

echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
TypeScript
56,321
star
2

superset

Apache Superset is a Data Visualization and Data Exploration Platform
TypeScript
55,051
star
3

dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
Java
40,333
star
4

spark

Apache Spark - A unified analytics engine for large-scale data processing
Scala
36,719
star
5

airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
Python
36,241
star
6

kafka

Mirror of Apache Kafka
Java
28,284
star
7

incubator-seata

๐Ÿ”ฅ Seata is an easy-to-use, high-performance, open source distributed transaction solution.
Java
24,602
star
8

skywalking

APM, Application Performance Monitoring System
Java
22,610
star
9

flink

Apache Flink
Java
22,197
star
10

mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
C++
20,572
star
11

shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Java
19,710
star
12

rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
Java
18,578
star
13

arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
C++
14,339
star
14

brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
C++
14,261
star
15

incubator-weex

Apache Weex (Incubating)
C++
13,884
star
16

hadoop

Apache Hadoop
Java
13,855
star
17

pulsar

Apache Pulsar - distributed pub-sub messaging system
Java
13,062
star
18

druid

Apache Druid: a high performance real-time analytics database.
Java
12,843
star
19

predictionio

PredictionIO, a machine learning server for developers and ML engineers.
Scala
12,556
star
20

doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
Java
12,312
star
21

zookeeper

Apache ZooKeeper
Java
11,532
star
22

incubator-answer

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
Go
11,487
star
23

apisix

The Cloud-Native API Gateway
Lua
11,031
star
24

thrift

Apache Thrift
C++
9,900
star
25

dolphinscheduler

Apache DolphinScheduler is the modern data workflow orchestration platform with powerful user interface, dedicated to solving complex task dependencies in the data pipeline and providing various types of jobs available `out of the box`
Java
9,619
star
26

cassandra

Mirror of Apache Cassandra
Java
8,187
star
27

shardingsphere-elasticjob

Distributed scheduled job
Java
7,965
star
28

seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
Java
7,854
star
29

tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
Python
7,828
star
30

beam

Apache Beam is a unified programming model for Batch and Streaming data processing.
Java
7,737
star
31

shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
Java
7,541
star
32

jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
Java
7,335
star
33

tomcat

Apache Tomcat
Java
6,926
star
34

storm

Apache Storm
Java
6,480
star
35

zeppelin

Web-based notebook that enables data-driven, interactive data analytics and collaborative documents with SQL, Scala and more.
Java
6,162
star
36

openwhisk

Apache OpenWhisk is an open source serverless cloud platform
Scala
6,130
star
37

iceberg

Apache Iceberg
Java
6,103
star
38

couchdb

Seamless multi-master syncing database with an intuitive HTTP/JSON API, designed for reliability
Erlang
5,810
star
39

incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
Java
5,542
star
40

pinot

Apache Pinot - A realtime distributed OLAP datastore
Java
5,381
star
41

dubbo-spring-boot-project

Spring Boot Project for Apache Dubbo
Java
5,355
star
42

mesos

Apache Mesos
Java
5,111
star
43

hive

Apache Hive
Java
5,053
star
44

camel

Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.
Java
5,042
star
45

groovy

Apache Groovy: A powerful multi-faceted programming language for the JVM platform
Java
4,977
star
46

hbase

Apache HBase
Java
4,971
star
47

incubator-weex-ui

๐Ÿ„ A rich interaction, lightweight, high performance UI library based on Weex.
Vue
4,788
star
48

ignite

Apache Ignite
Java
4,548
star
49

rocketmq-externals

Mirror of Apache RocketMQ (Incubating)
Java
4,474
star
50

incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
C++
4,381
star
51

iotdb

Apache IoTDB
Java
4,372
star
52

lucene-solr

Apache Lucene and Solr open-source search software
4,349
star
53

dubbo-go

Go Implementation For Apache Dubbo
Go
4,315
star
54

shiro

Apache Shiro
Java
4,164
star
55

calcite

Apache Calcite
Java
4,028
star
56

nifi

Apache NiFi
Java
4,006
star
57

maven

Apache Maven core
Java
3,836
star
58

hudi

Upserts, Deletes And Incremental Processing on Big Data.
Java
3,804
star
59

dubbo-admin

The ops and reference implementation for Apache Dubbo
Java
3,707
star
60

incubator-heron

Apache Heron (Incubating) is a realtime, distributed, fault-tolerant stream processing engine from Twitter
Java
3,646
star
61

cordova-android

Apache Cordova Android
JavaScript
3,539
star
62

kylin

Apache Kylin
Java
3,526
star
63

httpd

Mirror of Apache HTTP Server. Issues: http://issues.apache.org
C
3,510
star
64

linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
Java
3,288
star
65

incubator-kie-optaplanner

AI constraint solver in Java to optimize the vehicle routing problem, employee rostering, task assignment, maintenance scheduling, conference scheduling and other planning problems.
Java
3,152
star
66

logging-log4j2

Apache Log4j 2 is a versatile, feature-rich, efficient logging API and backend for Java.
Java
3,151
star
67

fury

A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
Java
3,000
star
68

arrow-datafusion

Apache Arrow DataFusion SQL Query Engine
Rust
2,998
star
69

curator

Apache Curator
Java
2,997
star
70

singa

a distributed deep learning platform
C++
2,968
star
71

avro

Apache Avro is a data serialization system.
Java
2,872
star
72

incubator-streampark

StreamPark, Make stream processing easier! easy-to-use streaming application development framework and operation platform
Scala
2,820
star
73

nutch

Apache Nutch is an extensible and scalable web crawler
Java
2,653
star
74

netbeans

Apache NetBeans
Java
2,635
star
75

guacamole-server

Mirror of Apache Guacamole Server
C
2,601
star
76

commons-lang

Apache Commons Lang
Java
2,539
star
77

incubator-devlake

Apache DevLake is an open-source dev data platform to ingest, analyze, and visualize the fragmented data from DevOps tools, extracting insights for engineering excellence, developer experience, and community growth.
Go
2,528
star
78

flume

Mirror of Apache Flume
Java
2,458
star
79

geode

Apache Geode
Java
2,244
star
80

gobblin

A distributed data integration framework that simplifies common aspects of big data integration such as data ingestion, replication, organization and lifecycle management for both streaming and batch data ecosystems.
Java
2,209
star
81

incubator-seata-samples

seata-samples
Java
2,196
star
82

maven-mvnd

Apache Maven Daemon
Java
2,191
star
83

activemq

Mirror of Apache ActiveMQ
Java
2,184
star
84

incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
Java
2,156
star
85

kvrocks

Kvrocks is a distributed key value NoSQL database that uses RocksDB as storage engine and is compatible with Redis protocol.
C++
2,147
star
86

pdfbox

Mirror of Apache PDFBox
Java
2,131
star
87

cordova-ios

Apache Cordova iOS
JavaScript
2,130
star
88

mahout

Mirror of Apache Mahout
Java
2,095
star
89

lucenenet

Apache Lucene.NET
C#
2,031
star
90

ambari

Apache Ambari simplifies provisioning, managing, and monitoring of Apache Hadoop clusters.
Java
1,990
star
91

libcloud

Apache Libcloud is a Python library which hides differences between different cloud provider APIs and allows you to manage different cloud resources through a unified and easy to use API.
Python
1,956
star
92

cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
Java
1,945
star
93

tika

The Apache Tika toolkit detects and extracts metadata and text from over a thousand different file types (such as PPT, XLS, and PDF).
Java
1,860
star
94

drill

Apache Drill is a distributed MPP query layer for self describing data
Java
1,841
star
95

dubbo-samples

samples for Apache Dubbo
Java
1,839
star
96

servicecomb-java-chassis

ServiceComb Java Chassis is a Software Development Kit (SDK) for rapid development of microservices in Java, providing service registration, service discovery, dynamic routing, and service management features
Java
1,829
star
97

tinkerpop

Apache TinkerPop - a graph computing framework
Java
1,825
star
98

trafficserver

Apache Traffic Serverโ„ข is a fast, scalable and extensible HTTP/1.1 and HTTP/2 compliant caching proxy server.
C++
1,804
star
99

bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
Java
1,785
star
100

rocketmq-spring

Apache RocketMQ Spring Integration
Java
1,775
star