/**
* Does the work of creating the mappings for this AssignmentCreator
* @return the minor fragment id to work units mapping
*/
private ListMultimap<Integer, T> getMappings() {
Stopwatch watch = Stopwatch.createStarted();
maxWork = (int) Math.ceil(units.size() / ((float) incomingEndpoints.size()));
LinkedList<WorkEndpointListPair<T>> workList = getWorkList();
LinkedList<WorkEndpointListPair<T>> unassignedWorkList;
Map<NodeEndpoint,FragIteratorWrapper> endpointIterators = getEndpointIterators();
unassignedWorkList = assign(workList, endpointIterators, true);
assignLeftovers(unassignedWorkList, endpointIterators, true);
assignLeftovers(unassignedWorkList, endpointIterators, false);
if (!unassignedWorkList.isEmpty()) {
throw new IllegalStateException("There are still unassigned work units");
}
logger.debug("Took {} ms to assign {} work units to {} fragments", watch.elapsed(TimeUnit.MILLISECONDS), units.size(), incomingEndpoints.size());
return mappings;
}
AssignmentCreator.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:dremio-oss
作者:
评论列表
文章目录