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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.hadoop.mapreduce.InputFormat
     
    org.apache.pig.data.Tuple
     
    void
    prepareToRead(org.apache.hadoop.mapreduce.RecordReader reader, org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigSplit split)
     
    void
    setLocation(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 Details

    • VespaSimpleJsonLoader

      public VespaSimpleJsonLoader()
  • Method Details

    • 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