重新分区
根据提取的数据在分片之间移动记录。
Redis 堆栈 |
---|
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();
});
On this page