synchronized Collection<BlackListInfo> getBlackListedTrackers() {
Collection<BlackListInfo> blackListedTrackers =
new ArrayList<BlackListInfo>();
for(TaskTrackerStatus tracker : blacklistedTaskTrackers()) {
String hostName = tracker.getHost();
BlackListInfo bi = new BlackListInfo();
bi.setTrackerName(tracker.getTrackerName());
Set<ReasonForBlackListing> rfbs =
getReasonForBlackList(hostName);
StringBuffer sb = new StringBuffer();
for(ReasonForBlackListing rfb : rfbs) {
sb.append(rfb.toString());
sb.append(",");
}
if (sb.length() > 0) {
sb.replace(sb.length()-1, sb.length(), "");
}
bi.setReasonForBlackListing(sb.toString());
bi.setBlackListReport(
getFaultReport(hostName));
blackListedTrackers.add(bi);
}
return blackListedTrackers;
}