Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig, mail # dev - Review Request: PIG-3015 Rewrite of AvroStorage


+
Joseph Adler 2012-11-17, 05:28
+
Cheolsoo Park 2012-12-03, 19:22
+
Joseph Adler 2012-12-06, 00:27
+
Joseph Adler 2012-12-03, 22:55
+
Joseph Adler 2012-12-17, 19:36
+
Joseph Adler 2012-12-20, 17:24
+
Joseph Adler 2013-01-04, 19:22
+
Joseph Adler 2013-01-04, 19:22
+
Jonathan Coveney 2013-03-19, 16:40
Copy link to this message
-
Re: Review Request: PIG-3015 Rewrite of AvroStorage
Joseph Adler 2013-05-20, 16:38


> On March 19, 2013, 4:40 p.m., Jonathan Coveney wrote:
> > src/org/apache/pig/builtin/AvroStorage.java, line 352
> > <https://reviews.apache.org/r/8104/diff/4/?file=244837#file244837line352>
> >
> >     I realize using Long's compareTo is convenient, but this seems like unnecessary boxing. why not just compare them directly? I realize this isn't performance critical cord, it just stuck out to me, since you could just do a > instead...

For sorting, you need to implement compare (which tests for <, ==, and >). I switched to com.google.common.primitives.Longs.compare
> On March 19, 2013, 4:40 p.m., Jonathan Coveney wrote:
> > src/org/apache/pig/impl/util/avro/AvroTupleWrapper.java, line 66
> > <https://reviews.apache.org/r/8104/diff/4/?file=244846#file244846line66>
> >
> >     May want to throw an UnsupportedOperationException instead, as if this is being called, it's a more fundamental issue with Pig, separate from write related issues.

Stuck with the exceptions in the existing Tuple interface... but yes, that would be more logical
> On March 19, 2013, 4:40 p.m., Jonathan Coveney wrote:
> > src/org/apache/pig/impl/util/avro/AvroTupleWrapper.java, line 84
> > <https://reviews.apache.org/r/8104/diff/4/?file=244846#file244846line84>
> >
> >     shouldn't this throw an error? Or is avroObject.put() doing something I don't expect, perhaps being 1-indexed instead of 0-indexed?

I think that write is never called; in the current version it just throws an error
- Joseph
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/8104/#review18077
-----------------------------------------------------------
On Jan. 4, 2013, 7:22 p.m., Joseph Adler wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/8104/
> -----------------------------------------------------------
>
> (Updated Jan. 4, 2013, 7:22 p.m.)
>
>
> Review request for pig and Cheolsoo Park.
>
>
> Description
> -------
>
> The current AvroStorage implementation has a lot of issues: it requires old versions of Avro, it copies data much more than needed, and it's verbose and complicated. (One pet peeve of mine is that old versions of Avro don't support Snappy compression.)
>
> I rewrote AvroStorage from scratch to fix these issues. In early tests, the new implementation is significantly faster, and the code is a lot simpler. Rewriting AvroStorage also enabled me to implement support for Trevni.
>
> This is the latest version of the patch, complete with test cases and TrevniStorage. (Test cases for TrevniStorage are still missing).
>
>
> This addresses bug PIG-3015.
>     https://issues.apache.org/jira/browse/PIG-3015
>
>
> Diffs
> -----
>
>   .eclipse.templates/.classpath c7b83b8
>   ivy.xml 70e8d50
>   ivy/libraries.properties 7b07c7e
>   src/org/apache/pig/builtin/AvroStorage.java PRE-CREATION
>   src/org/apache/pig/builtin/TrevniStorage.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroArrayReader.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroBagWrapper.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroMapWrapper.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroRecordReader.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroRecordWriter.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroStorageDataConversionUtilities.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroStorageSchemaConversionUtilities.java PRE-CREATION
>   src/org/apache/pig/impl/util/avro/AvroTupleWrapper.java PRE-CREATION
>   test/commit-tests 5081fbc
>   test/org/apache/pig/builtin/TestAvroStorage.java PRE-CREATION
>   test/org/apache/pig/builtin/avro/code/pig/directory_test.pig PRE-CREATION
>   test/org/apache/pig/builtin/avro/code/pig/identity.pig PRE-CREATION
>   test/org/apache/pig/builtin/avro/code/pig/identity_ai1_ao2.pig PRE-CREATION
+
Joseph Adler 2013-05-20, 16:38
+
Joseph Adler 2013-05-20, 16:39