Class ImportJSON.JsonTextImporter

java.lang.Object
org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.ojai.Document,org.ojai.Value,org.ojai.Document>
com.mapr.db.mapreduce.tools.ImportJSON.JsonTextImporter
Enclosing class:
ImportJSON

public static class ImportJSON.JsonTextImporter extends org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.ojai.Document,org.ojai.Value,org.ojai.Document>
This class reads JSON data from text files in the Map phase. It also converts the JSON data into Ojai records and writes them to MapR Document-DB a table
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Mapper

    org.apache.hadoop.mapreduce.Mapper.Context
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    map(org.apache.hadoop.io.LongWritable key, org.ojai.Document record, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.ojai.Document,org.ojai.Value,org.ojai.Document>.org.apache.hadoop.mapreduce.Mapper.Context context)
     

    Methods inherited from class org.apache.hadoop.mapreduce.Mapper

    cleanup, run, setup

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • counter

      public static int counter
  • Constructor Details

    • JsonTextImporter

      public JsonTextImporter()
  • Method Details

    • map

      public void map(org.apache.hadoop.io.LongWritable key, org.ojai.Document record, org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.ojai.Document,org.ojai.Value,org.ojai.Document>.org.apache.hadoop.mapreduce.Mapper.Context context) throws IOException, InterruptedException
      Overrides:
      map in class org.apache.hadoop.mapreduce.Mapper<org.apache.hadoop.io.LongWritable,org.ojai.Document,org.ojai.Value,org.ojai.Document>
      Throws:
      IOException
      InterruptedException