Beispiel #1
0
 @Override
 public HeavyReport queryMonthlyReport(String domain, Date start) {
   try {
     MonthlyReport entity =
         m_monthlyReportDao.findReportByDomainNamePeriod(
             start, domain, Constants.REPORT_HEAVY, MonthlyReportEntity.READSET_FULL);
     return queryFromMonthlyBinary(entity.getId(), domain);
   } catch (DalNotFoundException e) {
     // ignore
   } catch (Exception e) {
     Cat.logError(e);
   }
   return new HeavyReport(domain);
 }
Beispiel #2
0
  @Override
  public StateReport queryMonthlyReport(String domain, Date start) {
    try {
      MonthlyReport entity =
          m_monthlyReportDao.findReportByDomainNamePeriod(
              start, domain, StateAnalyzer.ID, MonthlyReportEntity.READSET_FULL);
      String content = entity.getContent();

      if (content != null && content.length() > 0) {
        return com.dianping.cat.consumer.state.model.transform.DefaultSaxParser.parse(content);
      } else {
        return queryFromMonthlyBinary(entity.getId(), domain);
      }
    } catch (DalNotFoundException e) {
      // ignore
    } catch (Exception e) {
      Cat.logError(e);
    }
    return new StateReport(domain);
  }