Class InfluxDBSink

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.apache.pulsar.io.core.Sink<org.apache.pulsar.client.api.schema.GenericRecord>

    public class InfluxDBSink
    extends BatchSink<com.influxdb.client.write.Point,​org.apache.pulsar.client.api.schema.GenericRecord>
    Pulsar sink for InfluxDB2
    • Constructor Summary

      Constructors 
      Constructor Description
      InfluxDBSink()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected com.influxdb.client.write.Point buildPoint​(org.apache.pulsar.functions.api.Record<org.apache.pulsar.client.api.schema.GenericRecord> record)  
      void close()  
      void open​(java.util.Map<java.lang.String,​java.lang.Object> config, org.apache.pulsar.io.core.SinkContext sinkContext)  
      protected void writePoints​(java.util.List<com.influxdb.client.write.Point> points)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InfluxDBSink

        public InfluxDBSink()
    • 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
        Throws:
        java.lang.Exception
      • buildPoint

        protected final com.influxdb.client.write.Point buildPoint​(org.apache.pulsar.functions.api.Record<org.apache.pulsar.client.api.schema.GenericRecord> record)
        Specified by:
        buildPoint in class BatchSink<com.influxdb.client.write.Point,​org.apache.pulsar.client.api.schema.GenericRecord>
      • writePoints

        protected void writePoints​(java.util.List<com.influxdb.client.write.Point> points)
                            throws java.lang.Exception
        Specified by:
        writePoints in class BatchSink<com.influxdb.client.write.Point,​org.apache.pulsar.client.api.schema.GenericRecord>
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Overrides:
        close in class BatchSink<com.influxdb.client.write.Point,​org.apache.pulsar.client.api.schema.GenericRecord>
        Throws:
        java.lang.Exception