Class UpsertTestSinkBuilder<IN>

java.lang.Object
org.apache.flink.connector.upserttest.sink.UpsertTestSinkBuilder<IN>
Type Parameters:
IN - type of the records written to the file

@PublicEvolving public class UpsertTestSinkBuilder<IN> extends Object
Builder to construct UpsertTestSink.

The following example shows the minimum setup to create a UpsertTestSink that writes Tuple2<String, String> values to a file.


 UpsertTestSink<Tuple2<String, String>> sink = UpsertTestSink
     .<Tuple2<String, String>>builder
     .setOutputFile(MY_OUTPUT_FILE)
     .setKeySerializationSchema(MY_KEY_SERIALIZER)
     .setValueSerializationSchema(MY_VALUE_SERIALIZER)
     .build();
 
  • Constructor Details

    • UpsertTestSinkBuilder

      public UpsertTestSinkBuilder()
  • Method Details

    • setOutputFile

      public UpsertTestSinkBuilder<IN> setOutputFile(File outputFile)
      Sets the output File to write to.
      Parameters:
      outputFile -
      Returns:
      UpsertTestSinkBuilder
    • setKeySerializationSchema

      public UpsertTestSinkBuilder<IN> setKeySerializationSchema(org.apache.flink.api.common.serialization.SerializationSchema<IN> keySerializationSchema)
      Sets the key SerializationSchema that transforms incoming records to byte[].
      Parameters:
      keySerializationSchema -
      Returns:
      UpsertTestSinkBuilder
    • setValueSerializationSchema

      public UpsertTestSinkBuilder<IN> setValueSerializationSchema(org.apache.flink.api.common.serialization.SerializationSchema<IN> valueSerializationSchema)
      Sets the value SerializationSchema that transforms incoming records to byte[].
      Parameters:
      valueSerializationSchema -
      Returns:
      UpsertTestSinkBuilder
    • build

      public UpsertTestSink<IN> build()
      Constructs the UpsertTestSink with the configured properties.
      Returns:
      UpsertTestSink