Class PaginateBySizePartitioner

  • All Implemented Interfaces:
    Partitioner

    @Internal
    public final class PaginateBySizePartitioner
    extends java.lang.Object
    Paginate by size partitioner.

    Paginates the collection using the average document size to split the collection into average sized chunks:

    • "partition.field": The field to be used for partitioning. Must be a unique field. Defaults to: "_id".
    • "partition.size": The average size per partition. Defaults to: 64.
    • Field Detail

      • PARTITION_SIZE_MB_CONFIG

        public static final java.lang.String PARTITION_SIZE_MB_CONFIG
        See Also:
        Constant Field Values
      • PARTITION_FIELD_DEFAULT

        public static final java.lang.String PARTITION_FIELD_DEFAULT
        See Also:
        Constant Field Values
      • PARTITION_FIELD_CONFIG

        public static final java.lang.String PARTITION_FIELD_CONFIG
        See Also:
        Constant Field Values
    • Constructor Detail

      • PaginateBySizePartitioner

        public PaginateBySizePartitioner()
        Construct an instance
    • Method Detail

      • generatePartitions

        public java.util.List<MongoInputPartition> generatePartitions​(ReadConfig readConfig)
        Description copied from interface: Partitioner
        Generate the partitions for the collection based upon the read configuration
        Parameters:
        readConfig - the read configuration
        Returns:
        the partitions