return report;
}
@Override
public MatrixReport queryDailyReport(String domain, Date start, Date end) {
MatrixReportMerger merger = new MatrixReportMerger(new MatrixReport(domain));
long startTime = start.getTime();
long endTime = end.getTime();
String name = MatrixAnalyzer.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) {
MatrixReport reportModel = com.dianping.cat.consumer.matrix.model.transform.DefaultSaxParser.parse(xml);
reportModel.accept(merger);
} else {
MatrixReport reportModel = queryFromDailyBinary(report.getId(), domain);
reportModel.accept(merger);
}
} catch (DalNotFoundException e) {
//ignore
} catch (Exception e) {
Cat.logError(e);
}
}
MatrixReport matrixReport = merger.getMatrixReport();
matrixReport.setStartTime(start);
matrixReport.setEndTime(end);
return matrixReport;
}