Merge branch 'master' into fsa_codegen2

Conflicts:
	parquet-column/pom.xml
	parquet-column/src/main/java/parquet/example/DummyRecordConverter.java
	parquet-column/src/main/java/parquet/schema/PrimitiveType.java
	parquet-column/src/test/java/parquet/io/PerfTest.java
tree: 89131c68484a8960e89891b664f1109c0c548876
  1. doc/
  2. parquet-avro/
  3. parquet-cascading/
  4. parquet-column/
  5. parquet-common/
  6. parquet-encoding/
  7. parquet-generator/
  8. parquet-hadoop/
  9. parquet-pig/
  10. parquet-scrooge/
  11. parquet-test-hadoop2/
  12. parquet-thrift/
  13. src/
  14. .gitignore
  15. .travis.yml
  16. LICENSE
  17. NOTICE
  18. pom.xml
  19. README.md
README.md

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

Features

Parquet is a very active project, and new features are being added quickly; below is the state as of June 2013.

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. If you are using Thrift through Scala, you may be using Twitter‘s Scrooge. If that’s the case, not to worry -- we took care of the Scrooge/Apache Thrift glue for you in the parquet-scrooge sub-project.

Avro

Avro conversion is implemented via the parquet-avro 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 524288000 -- 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 under development in Issue 28 and very close to being merged! Feel free to try out that branch and tell us what you think.

Build

to run the unit tests: mvn test

to build the jars: mvn package

The build runs in Travis CI: Build Status

Add Parquet as a dependency in Maven

Snapshot releases

  <repositories>
    <repository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
     </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>com.twitter</groupId>
      <artifactId>parquet-column</artifactId>
      <version>1.0.0-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>com.twitter</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>1.0.0-SNAPSHOT</version>
    </dependency>
  </dependencies>

Official releases

We haven't published a 1.0.0 yet

Authors and contributors

Discussions

License

Copyright 2012-2013 Twitter, Inc.

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