MCPcopy Index your code
hub / github.com/apache/pulsar / SinkForTest

Class SinkForTest

pulsar-broker/src/test/java/org/apache/pulsar/io/SinkForTest.java:26–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24import org.apache.pulsar.io.core.SinkContext;
25
26public class SinkForTest<T> implements Sink<String> {
27 @Override
28 public void open(Map<String, Object> config, SinkContext sinkContext) throws Exception {
29
30 }
31
32 @Override
33 public void write(Record<String> record) throws Exception {
34 if (record.getValue().contains("fail")) {
35 record.fail();
36 } else {
37 record.ack();
38 }
39 }
40
41 @Override
42 public void close() throws Exception {
43
44 }
45}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected