Package org.apache.pulsar.io.redis.sink
Class RedisSink
- java.lang.Object
-
- org.apache.pulsar.io.redis.sink.RedisSink
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.apache.pulsar.io.core.Sink<byte[]>
public class RedisSink extends java.lang.Object implements 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 Constructor Description RedisSink()
-
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.SinkContext sinkContext)voidwrite(org.apache.pulsar.functions.api.Record<byte[]> record)
-
-
-
Method Detail
-
open
public void open(java.util.Map<java.lang.String,java.lang.Object> config, org.apache.pulsar.io.core.SinkContext sinkContext) throws java.lang.Exception- Specified by:
openin interfaceorg.apache.pulsar.io.core.Sink<byte[]>- Throws:
java.lang.Exception
-
write
public void write(org.apache.pulsar.functions.api.Record<byte[]> record) throws java.lang.Exception- Specified by:
writein interfaceorg.apache.pulsar.io.core.Sink<byte[]>- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-