private TopologyCache topologyCache = new TopologyCache();
private int totalFragmentNum = 0;
private FragmentsPerDisk getHostFragmentSet(String host, Integer diskId) {
Map<Integer, FragmentsPerDisk> fragmentsPerDiskMap;
FragmentsPerDisk fragmentsPerDisk;
if (fragmentHostMapping.containsKey(host)) {
fragmentsPerDiskMap = fragmentHostMapping.get(host);
} else {
fragmentsPerDiskMap = new HashMap<Integer, FragmentsPerDisk>();
fragmentHostMapping.put(host, fragmentsPerDiskMap);
}
if (fragmentsPerDiskMap.containsKey(diskId)) {
fragmentsPerDisk = fragmentsPerDiskMap.get(diskId);
} else {
fragmentsPerDisk = new FragmentsPerDisk(diskId);
fragmentsPerDiskMap.put(diskId, fragmentsPerDisk);
}
return fragmentsPerDisk;
}