gerritjvv / elephant-bird Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dvryaboy/elephant-bird
Twitter's collection of LZO and Protocol Buffer-related Hadoop, Pig, and HBase code.
License: Apache License 2.0
This project forked from dvryaboy/elephant-bird
Twitter's collection of LZO and Protocol Buffer-related Hadoop, Pig, and HBase code.
License: Apache License 2.0
merge the proto input, output pig formats.
The loader throws an exception if its passes a 0 length file.
The exception received is:
org.apache.pig.backend.executionengine.ExecException: ERROR 6018: Error while reading input
at com.twitter.elephantbird.pig.proto.LzoProtobuffB64LinePigStore.getNext(Unknown Source)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.nextKeyValue(PigRecordReader.java:187)
at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(MapTask.java:423)
at org.apache.hadoop.mapreduce.MapContext.nextKeyValue(MapContext.java:67)
at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:143)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
at org.apache.hadoop.mapred.Child.main(Child.java:170)
Caused by: java.lang.ArrayIndexOutOfBoundsException: -17
at org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137)
at org.apache.commons.codec.binary.Base64.discardNonBase64(Base64.java:478)
at org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:374)
at org.apache.commons.codec.binary.Base64.decode(Base64.java:220)
... 8 more
The fix is to check for the Text.length before reading.
LzoProtobuffB64LinePigStorage.getNext line 169 is throwing an exception when it can transform the gpb line.
This causes the whole job to fail. Its more important that the job does not fail. So I've added in a try catch that writes a BADGPB counter and still allows the job to continue.
Hi Gerrit,
I have asked at kevinweil/elephant-bird whether they are interested in merging your LzoPigStorage class into their official repository:
Second, gerritjvv forked Dmitriy's EB repo some time ago (gerritjvv/elephant-bird).
He added the class LzoPigStorage.java. This class appears to be a very simple,
straight-forward LZO-enabled wrapper for standard PigStorage -- less than 10 lines
of effective code.
Dmitriy (https://github.com/dvryaboy) replied:
We can certainly pull in Gerrit's LzoPigStorage, he just needs to send a pull request :).
Would this be ok for you?
Best,
Michael
Some fields go missing when using a complex message structure. This is due to the column pruning not working correctly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.