use of com.alibaba.otter.node.etl.load.loader.weight.WeightBuckets in project otter by alibaba.
the class DbLoadAction method buildWeightBuckets.
/**
* 构建基于weight权重分组的item集合列表
*/
private WeightBuckets<EventData> buildWeightBuckets(DbLoadContext context, List<EventData> datas) {
WeightBuckets<EventData> buckets = new WeightBuckets<EventData>();
for (EventData data : datas) {
// 获取对应的weight
DataMediaPair pair = ConfigHelper.findDataMediaPair(context.getPipeline(), data.getPairId());
buckets.addItem(pair.getPushWeight(), data);
}
return buckets;
}
use of com.alibaba.otter.node.etl.load.loader.weight.WeightBuckets in project otter by alibaba.
the class FileLoadAction method buildWeightBuckets.
/**
* 构建基于weight权重分组的item集合列表
*/
private WeightBuckets<FileData> buildWeightBuckets(Identity identity, List<FileData> datas) {
WeightBuckets<FileData> buckets = new WeightBuckets<FileData>();
for (FileData data : datas) {
// 获取对应的weight
DataMediaPair pair = ConfigHelper.findDataMediaPair(getPipeline(identity), data.getPairId());
buckets.addItem(pair.getPushWeight(), data);
}
return buckets;
}
Aggregations