Repartition

Moves records between shards according to the extracted data.

public GearsBuilder<T> repartition(
	gears.operations.ExtractorOperation<T> extractor)

Moves records between the shards. The extracted data determines the new shard location for each record.

Parameters

Name Type Description
extractor ExtractorOperation Extracts a specific value from each record

Returns

Returns a GearsBuilder object with a new template type.

Example

Repartition by value:

GearsBuilder.CreateGearsBuilder(reader).
   	repartition(r->{
   		return r.getStringVal();
});
RATE THIS PAGE
Back to top ↑