Package org.apache.pulsar.io.file
Class FileSource
- java.lang.Object
-
- org.apache.pulsar.io.core.PushSource<byte[]>
-
- org.apache.pulsar.io.file.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 voidclose()voidopen(java.util.Map<java.lang.String,java.lang.Object> config, org.apache.pulsar.io.core.SourceContext sourceContext)
-
-
-
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:
openin interfaceorg.apache.pulsar.io.core.Source<byte[]>- Specified by:
openin classorg.apache.pulsar.io.core.PushSource<byte[]>- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception- Throws:
java.lang.Exception
-
-