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
    • 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)  
      • Methods inherited from class org.apache.pig.LoadFunc

        getAbsolutePath, getCacheFiles, getLoadCaster, getPathStrings, getShipFiles, join, relativeToAbsolutePath, setUDFContextSignature, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VespaSimpleJsonLoader

        public VespaSimpleJsonLoader()
    • Method Detail

      • setLocation

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

        public org.apache.hadoop.mapreduce.InputFormat getInputFormat()
                                                               throws java.io.IOException
        Specified by:
        getInputFormat in class org.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 class org.apache.pig.LoadFunc
        Throws:
        java.io.IOException
      • getNext

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