Package com.yahoo.vespa.hadoop.pig
Class VespaSimpleJsonLoader
- java.lang.Object
-
- org.apache.pig.LoadFunc
-
- com.yahoo.vespa.hadoop.pig.VespaSimpleJsonLoader
-
public class VespaSimpleJsonLoader extends org.apache.pig.LoadFunc
Simple JSON loader which loads either one JSON object per line or a multiline JSON consisting of objects in an array. Returns only the textual representation of the JSON object.- Author:
- lesters
-
-
Constructor Summary
Constructors Constructor Description VespaSimpleJsonLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.hadoop.mapreduce.InputFormat
getInputFormat()
org.apache.pig.data.Tuple
getNext()
void
prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader, org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split)
void
setLocation(java.lang.String location, org.apache.hadoop.mapreduce.Job job)
-
-
-
Method Detail
-
setLocation
public void setLocation(java.lang.String location, org.apache.hadoop.mapreduce.Job job) throws java.io.IOException
- Specified by:
setLocation
in classorg.apache.pig.LoadFunc
- Throws:
java.io.IOException
-
getInputFormat
public org.apache.hadoop.mapreduce.InputFormat getInputFormat() throws java.io.IOException
- Specified by:
getInputFormat
in classorg.apache.pig.LoadFunc
- Throws:
java.io.IOException
-
prepareToRead
public void prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader, org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split) throws java.io.IOException
- Specified by:
prepareToRead
in classorg.apache.pig.LoadFunc
- Throws:
java.io.IOException
-
getNext
public org.apache.pig.data.Tuple getNext() throws java.io.IOException
- Specified by:
getNext
in classorg.apache.pig.LoadFunc
- Throws:
java.io.IOException
-
-