Default partitioner in s3 sink vs others

0

io.confluent.connect.storage.partitioner.DefaultPartitioner

What would be the effect of choosing a different partitioner in s3 sink connector than default. What would be the recommended parameter to be used?

asked a year ago554 views
1 Answer
0

The Confluent S3 connector provides a variety of partitioners that can be used to control how records are written to S3. The default partitioner preserves the same topic partitions as in Kafka, and records from each topic partition ultimately end up in S3 objects with names that include the Kafka topic and Kafka partitions.

Other S3 partitioners available include:

  1. Field Partitioner: The Field Partitioner determines the partition from the field within each record identified by the connector's partition.field.name configuration property, which has no default.

  2. Time Based Partitioner: The Time Based Partitioner determines the partition from the year, month, day, hour, minutes, and/or seconds.

  3. Daily Partitioner: The Daily Partitioner is equivalent to the Time Based Partitioner with path.format='year'=YYYY/'month'=MM/'day'=dd and partition.duration.ms =86400000 (one day, for one S3 object in each daily directory).

  4. Hourly Partitioner: The Hourly Partitioner is equivalent to the Time Based Partitioner with path.format='year'=YYYY/'month'=MM/'day'=dd/'hour'=HH and partition.duration.ms =3600000 (one hour, for one S3 object in each hourly directory).

The choice of partitioner will depend on the specific requirements of the use case. For example, if the data needs to be partitioned by time, then the Time Based Partitioner or the Daily Partitioner would be appropriate. If the data needs to be partitioned by a specific field, then the Field Partitioner would be appropriate.

Please note that any recommendations could be provided solely based on customer's use-case.

Please refer to the below document for more information: [1] https://docs.confluent.io/kafka-connectors/s3-sink/current/overview.html#partitioning-records-into-s3-objects

AWS
SUPPORT ENGINEER
answered a year ago
AWS
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions