Package org.apache.pulsar.io.redis.sink
Class RedisSink
java.lang.Object
org.apache.pulsar.io.redis.sink.RedisSink
- All Implemented Interfaces:
AutoCloseable,org.apache.pulsar.io.core.Sink<byte[]>
A Simple Redis sink, which stores the key/value records from Pulsar in redis.
Note that records from Pulsar with null keys or values will be ignored.
This class expects records from Pulsar to have a key and value that are stored as bytes or a string.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
RedisSink
public RedisSink()
-
-
Method Details
-
open
public void open(Map<String, Object> config, org.apache.pulsar.io.core.SinkContext sinkContext) throws Exception- Specified by:
openin interfaceorg.apache.pulsar.io.core.Sink<byte[]>- Throws:
Exception
-
write
- Specified by:
writein interfaceorg.apache.pulsar.io.core.Sink<byte[]>- Throws:
Exception
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-