return report;
}
@Override
public ProblemReport queryDailyReport(String domain, Date start, Date end) {
ProblemReportMerger merger = new ProblemReportMerger(new ProblemReport(domain));
long startTime = start.getTime();
long endTime = end.getTime();
String name = ProblemAnalyzer.ID;
for (; startTime < endTime; startTime = startTime + TimeHelper.ONE_DAY) {
try {
DailyReport report = m_dailyReportDao.findByDomainNamePeriod(domain, name, new Date(startTime),
DailyReportEntity.READSET_FULL);
String xml = report.getContent();
if (xml != null && xml.length() > 0) {
ProblemReport reportModel = com.dianping.cat.consumer.problem.model.transform.DefaultSaxParser
.parse(xml);
reportModel.accept(merger);
} else {
ProblemReport reportModel = queryFromDailyBinary(report.getId(), domain);
reportModel.accept(merger);
}
} catch (DalNotFoundException e) {
//ignore
} catch (Exception e) {
Cat.logError(e);
}
}
ProblemReport problemReport = merger.getProblemReport();
problemReport.setStartTime(start);
problemReport.setEndTime(end);
return problemReport;
}