Class FileSource

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.apache.pulsar.io.core.Source<byte[]>

    public class FileSource
    extends org.apache.pulsar.io.core.PushSource<byte[]>
    A simple connector to consume messages from the local file system. It can be configured to consume files recursively from a given directory, and can handle plain text, gzip, and zip formatted files.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSource()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void open​(java.util.Map<java.lang.String,​java.lang.Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)  
      • Methods inherited from class org.apache.pulsar.io.core.PushSource

        consume, getQueueLength, read
      • Methods inherited from class java.lang.Object

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

      • FileSource

        public FileSource()
    • Method Detail

      • open

        public void open​(java.util.Map<java.lang.String,​java.lang.Object> config,
                         org.apache.pulsar.io.core.SourceContext sourceContext)
                  throws java.lang.Exception
        Specified by:
        open in interface org.apache.pulsar.io.core.Source<byte[]>
        Specified by:
        open in class org.apache.pulsar.io.core.PushSource<byte[]>
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception