Class ImportJSON

  • All Implemented Interfaces:
    org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

    public class ImportJSON
    extends org.apache.hadoop.conf.Configured
    implements org.apache.hadoop.util.Tool
    This utility is used when importing JSON text files into a MapR Document-DB Table. If the utility is used with the '-bulkload' option set to 'true', the admin must clear the bulkload flag on the MapR-DB table after the import is complete, before the table can begin serving data, using the command 'maprcli table edit -path -bulkload false' on the server.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ImportJSON.JsonTextImporter
      This class reads JSON data from text files in the Map phase.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String TABLE_NAME  
    • Constructor Summary

      Constructors 
      Constructor Description
      ImportJSON()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.hadoop.mapreduce.Job createSubmittableJob​(org.apache.hadoop.conf.Configuration conf, java.lang.String[] args)  
      static void main​(java.lang.String[] args)  
      int run​(java.lang.String[] args)  
      • Methods inherited from class org.apache.hadoop.conf.Configured

        getConf, setConf
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.hadoop.conf.Configurable

        getConf, setConf
    • Constructor Detail

      • ImportJSON

        public ImportJSON()
    • Method Detail

      • createSubmittableJob

        public static org.apache.hadoop.mapreduce.Job createSubmittableJob​(org.apache.hadoop.conf.Configuration conf,
                                                                           java.lang.String[] args)
                                                                    throws java.io.IOException,
                                                                           java.lang.ClassNotFoundException,
                                                                           java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
        java.lang.InterruptedException
      • run

        public int run​(java.lang.String[] args)
                throws java.lang.Exception
        Specified by:
        run in interface org.apache.hadoop.util.Tool
        Throws:
        java.lang.Exception
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception