Package com.dianping.cat.home.alert.report.entity

Examples of com.dianping.cat.home.alert.report.entity.AlertReport.accept()


              DailyReportEntity.READSET_FULL);
        String xml = report.getContent();

        if (xml != null && xml.length() > 0) {
          AlertReport reportModel = com.dianping.cat.home.alert.report.transform.DefaultSaxParser.parse(xml);
          reportModel.accept(merger);
        } else {
          AlertReport reportModel = queryFromDailyBinary(report.getId(), domain);
          reportModel.accept(merger);
        }
      } catch (DalNotFoundException e) {
View Full Code Here


        if (xml != null && xml.length() > 0) {
          AlertReport reportModel = com.dianping.cat.home.alert.report.transform.DefaultSaxParser.parse(xml);
          reportModel.accept(merger);
        } else {
          AlertReport reportModel = queryFromDailyBinary(report.getId(), domain);
          reportModel.accept(merger);
        }
      } catch (DalNotFoundException e) {
        //ignore
      } catch (Exception e) {
        Cat.logError(e);
View Full Code Here

          String xml = report.getContent();

          try {
            if (xml != null && xml.length() > 0) {
              AlertReport reportModel = com.dianping.cat.home.alert.report.transform.DefaultSaxParser.parse(xml);
              reportModel.accept(merger);
            } else {
              AlertReport reportModel = queryFromHourlyBinary(report.getId(), domain);
              reportModel.accept(merger);
            }
          } catch (DalNotFoundException e) {
View Full Code Here

            if (xml != null && xml.length() > 0) {
              AlertReport reportModel = com.dianping.cat.home.alert.report.transform.DefaultSaxParser.parse(xml);
              reportModel.accept(merger);
            } else {
              AlertReport reportModel = queryFromHourlyBinary(report.getId(), domain);
              reportModel.accept(merger);
            }
          } catch (DalNotFoundException e) {
            //ignore
          } catch (Exception e) {
            Cat.logError(e);
View Full Code Here

   
    String expected = Files.forIO().readFrom(getClass().getResourceAsStream("result.xml"), "utf-8");
    AlertReportMerger merger = new AlertReportMerger(new AlertReport(reportOld.getDomain()));
   
    reportOld.accept(merger);
    reportNew.accept(merger);
   
    Assert.assertEquals("Check the build result!", expected.replace("\r", ""), merger.getAlertReport().toString()
          .replace("\r", ""));
    Assert.assertEquals("Source report is changed!", newXml.replace("\r", ""), reportNew.toString().replace("\r", ""));
View Full Code Here

    for (; startTime < endTime; startTime += TimeHelper.ONE_DAY) {
      try {
        AlertReport reportModel = m_reportService.queryAlertReport(domain, new Date(startTime), new Date(startTime
              + TimeHelper.ONE_DAY));
        reportModel.accept(merger);
      } catch (Exception e) {
        Cat.logError(e);
      }
    }
    AlertReport alertReport = merger.getAlertReport();
View Full Code Here

    for (; startTime < endTime; startTime = startTime + TimeHelper.ONE_HOUR) {
      Date date = new Date(startTime);
      AlertReport reportModel = m_reportService.queryAlertReport(domain, date, new Date(date.getTime()
            + TimeHelper.ONE_HOUR));

      reportModel.accept(merger);
    }
    AlertReport alertReport = merger.getAlertReport();

    return alertReport;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.