liveBook · Manning

Repartition

Also called repartitioning

Repartitioning is the redistribution of records or items across partitions according to a partitioning rule, potentially changing the number of partitions.

How 3 Manning books explain it

Kafka Streams in Action, Second Edition

KStream.repartition is a Kafka Streams operation that explicitly redistributes stream records into a repartition topic using configurable partitioning settings.

How it is used
Use KStream.repartition to explicitly redistribute changed keys before key-dependent aggregations or joins.
How deep it goes
Explains topology nodes, sub-topologies, configuration options, scaling effects, and optimization behavior through Java examples.
Examples
Demonstrates selectKey followed by repartition, groupByKey counting, joining, and a ten-partition throughput configuration.
What you can do after
Apply it via KStream.repartition to control repartition topics, downstream stateful processing, and task parallelism.

Read how Kafka Streams in Action, Second Edition explains repartition →

Apache Kafka in Action

Repartitioning redistributes stream records according to their keys so that records requiring keyed processing reach the appropriate task.

How it is used
Ensures joins and aggregations process records in the task corresponding to their keys after a key change.
How deep it goes
Explains automatic repartition topics, topology splitting, and network and storage costs, without detailing an explicit repartition() call.
Examples
Uses selectKey() followed by count(), and contrasts price conversion with assigning a product key.
What you can do after
Evaluate when a key change requires redistribution and when a value-only operation can avoid it.

Read how Apache Kafka in Action explains repartition →

Fast Python: High performance techniques for large datasets

How it is used
Uses repartitioning to tune Dask execution granularity as workload intensity changes across a computation.
How deep it goes
Explains partition-count and index-division strategies, task-graph effects, metadata limits, and data-movement costs.
Examples
Demonstrates tax data, three-to-two partition reduction, task-graph visualization, and Geo_Name-based index divisions.
What you can do after
Apply repartitioning via Dask to change partition counts or index ranges while evaluating balance, metadata, memory, and network costs.

Read how Fast Python: High performance techniques for large datasets explains repartition →

Also covered in

What to know first

Related concepts

Questions about repartition

What is repartition?

Repartitioning is the redistribution of records or items across partitions according to a partitioning rule, potentially changing the number of partitions.

Which Manning books explain repartition?

Kafka Streams in Action, Second Edition, Apache Kafka in Action and Fast Python: High performance techniques for large datasets.

What should I know before learning repartition?

Manning books that teach repartition usually introduce partition and topic first.

What is repartition also called?

Repartition is also called repartitioning.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.