/** * Get the list of Disk Ids * Unknown disk is -1. Others 0 ~ N */ public int[] getDiskIds() { if (diskIds == null) { this.diskIds = new int[getHosts().length]; Arrays.fill(this.diskIds, -1); } return diskIds; }
/** * Get the list of Disk Ids * Unknown disk is -1. Others 0 ~ N */ public int[] getDiskIds() { if (diskIds == null) { this.diskIds = new int[getHosts().length]; Arrays.fill(this.diskIds, -1); } return diskIds; }
/** * Generate the map of host and make them into Volume Ids. * */ private Map<String, Set<Integer>> getVolumeMap(List<FileFragment> frags) { Map<String, Set<Integer>> volumeMap = new HashMap<String, Set<Integer>>(); for (FileFragment frag : frags) { String[] hosts = frag.getHosts(); int[] diskIds = frag.getDiskIds(); for (int i = 0; i < hosts.length; i++) { Set<Integer> volumeList = volumeMap.get(hosts[i]); if (volumeList == null) { volumeList = new HashSet<Integer>(); volumeMap.put(hosts[i], volumeList); } if (diskIds.length > 0 && diskIds[i] > -1) { volumeList.add(diskIds[i]); } } } return volumeMap; } /**