Repartition

根据提取的数据,将记录在分片之间移动。

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

将记录在分片之间移动。提取的数据决定每个记录的新分片位置。

参数

名称 类型 描述
extractor ExtractorOperation 从每个记录中提取特定值

返回值

返回一个具有新模板类型的 GearsBuilder 对象。

示例

按值重新分区

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