Class TweetLoader


  • public class TweetLoader
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_ERROR_COUNT
      The internals of parsing a JSON file of tweets.
    • Constructor Summary

      Constructors 
      Constructor Description
      TweetLoader()  
    • Method Summary

      Modifier and Type Method Description
      static void readJSONByLine​(java.io.File jsonFile, JSONListener ingester)
      To read gzip/JSON files one row of JSON at a time.
      • Methods inherited from class java.lang.Object

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

      • MAX_ERROR_COUNT

        public static int MAX_ERROR_COUNT
        The internals of parsing a JSON file of tweets. You provide the receiver logic using JSONListener:
            myListener = JSONListener(){  readObject( String or JSON map); }
        
            TweetLoader.readJSONByLine(file, myListener)
         
    • Constructor Detail

      • TweetLoader

        public TweetLoader()
    • Method Detail

      • readJSONByLine

        public static void readJSONByLine​(java.io.File jsonFile,
                                          JSONListener ingester)
                                   throws java.io.IOException
        To read gzip/JSON files one row of JSON at a time. This will tolerate up to MAX_ERROR_COUNT for parsing data files...
        Parameters:
        jsonFile -
        ingester -
        Throws:
        java.io.IOException