类 RedisSink

java.lang.Object
org.apache.pulsar.io.redis.sink.RedisSink
所有已实现的接口:
AutoCloseable, org.apache.pulsar.io.core.Sink<byte[]>

public class RedisSink extends 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.
  • 构造器详细资料

    • RedisSink

      public RedisSink()
  • 方法详细资料

    • open

      public void open(Map<String,Object> config, org.apache.pulsar.io.core.SinkContext sinkContext) throws Exception
      指定者:
      open 在接口中 org.apache.pulsar.io.core.Sink<byte[]>
      抛出:
      Exception
    • write

      public void write(org.apache.pulsar.functions.api.Record<byte[]> record) throws Exception
      指定者:
      write 在接口中 org.apache.pulsar.io.core.Sink<byte[]>
      抛出:
      Exception
    • close

      public void close() throws Exception
      指定者:
      close 在接口中 AutoCloseable
      抛出:
      Exception