Class 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 Detail

      • VespaSimpleJsonLoader

        public VespaSimpleJsonLoader()
    • Method Detail

      • setLocation

        public void setLocation​(String location,
                                org.apache.hadoop.mapreduce.Job job)
                         throws IOException
        Specified by:
        setLocation in class org.apache.pig.LoadFunc
        Throws:
        IOException
      • getInputFormat

        public org.apache.hadoop.mapreduce.InputFormat getInputFormat()
                                                               throws IOException
        Specified by:
        getInputFormat in class org.apache.pig.LoadFunc
        Throws:
        IOException
      • prepareToRead

        public void prepareToRead​(org.apache.hadoop.mapreduce.RecordReader reader,
                                  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split)
                           throws IOException
        Specified by:
        prepareToRead in class org.apache.pig.LoadFunc
        Throws:
        IOException
      • getNext

        public org.apache.pig.data.Tuple getNext()
                                          throws IOException
        Specified by:
        getNext in class org.apache.pig.LoadFunc
        Throws:
        IOException