Examples of MonthlyReport


Examples of com.dianping.cat.core.dal.MonthlyReport

  public boolean buildMonthlyTask(String name, String domain, Date period) {
    ProblemReport problemReport = queryDailyReportsByDuration(domain, period, TaskHelper.nextMonthStart(period));
 
    new ProblemReportURLFilter().visitProblemReport(problemReport);
   
    MonthlyReport report = new MonthlyReport();

    report.setContent("");
    report.setCreationDate(new Date());
    report.setDomain(domain);
    report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
    report.setName(name);
    report.setPeriod(period);
    report.setType(1);
    byte[] binaryContent = DefaultNativeBuilder.build(problemReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  @Override
  public boolean buildMonthlyTask(String name, String domain, Date period) {
    UtilizationReport utilizationReport = queryDailyReportsByDuration(domain, period,
          TaskHelper.nextMonthStart(period));
    MonthlyReport report = new MonthlyReport();

    report.setContent("");
    report.setCreationDate(new Date());
    report.setDomain(domain);
    report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
    report.setName(name);
    report.setPeriod(period);
    report.setType(1);

    byte[] binaryContent = DefaultNativeBuilder.build(utilizationReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public UtilizationReport queryMonthlyReport(String domain, Date start) {
    try {
      MonthlyReport entity = m_monthlyReportDao.findReportByDomainNamePeriod(start, domain,
            Constants.REPORT_UTILIZATION, MonthlyReportEntity.READSET_FULL);
      String content = entity.getContent();

      if (content != null && content.length() > 0) {
        return com.dianping.cat.home.utilization.transform.DefaultSaxParser.parse(content);
      } else {
        return queryFromMonthlyBinary(entity.getId(), domain);
      }
    } catch (DalNotFoundException e) {
      //ignore
    } catch (Exception e) {
      Cat.logError(e);
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public boolean buildMonthlyTask(String name, String domain, Date period) {
    StateReport stateReport = queryDailyReportsByDuration(domain, period, TaskHelper.nextMonthStart(period));
    MonthlyReport report = new MonthlyReport();

    report.setContent("");
    report.setCreationDate(new Date());
    report.setDomain(domain);
    report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
    report.setName(name);
    report.setPeriod(period);
    report.setType(1);
    byte[] binaryContent = DefaultNativeBuilder.build(stateReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public ServiceReport queryMonthlyReport(String domain, Date start) {
    try {
      MonthlyReport entity = m_monthlyReportDao.findReportByDomainNamePeriod(start, domain,
            Constants.REPORT_SERVICE, MonthlyReportEntity.READSET_FULL);
      String content = entity.getContent();

      if (content != null && content.length() > 0) {
        return com.dianping.cat.home.service.transform.DefaultSaxParser.parse(content);
      } else {
        return queryFromMonthlyBinary(entity.getId(), domain);
      }
    } catch (DalNotFoundException e) {
      //ignore
    } catch (Exception e) {
      Cat.logError(e);
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @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);
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public AlertReport queryMonthlyReport(String domain, Date start) {
    try {
      MonthlyReport entity = m_monthlyReportDao.findReportByDomainNamePeriod(start, domain, Constants.REPORT_ALERT,
            MonthlyReportEntity.READSET_FULL);
      String content = entity.getContent();

      if (content != null && content.length() > 0) {
        return com.dianping.cat.home.alert.report.transform.DefaultSaxParser.parse(content);
      } else {
        return queryFromMonthlyBinary(entity.getId(), domain);
      }
    } catch (DalNotFoundException e) {
      //ignore
    } catch (Exception e) {
      Cat.logError(e);
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

    for (Domain d : bugReport.getDomains().values()) {
      d.setProblemUrl(String.format("http://%s/cat/r/p?op=history&reportType=month&domain=%s&date=%s",
            getDomainName(), d.getId(), m_daily_formate.format(period)));
    }
    MonthlyReport report = new MonthlyReport();

    report.setContent("");
    report.setCreationDate(new Date());
    report.setDomain(domain);
    report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
    report.setName(name);
    report.setPeriod(period);
    report.setType(1);
    byte[] binaryContent = DefaultNativeBuilder.build(bugReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public EventReport queryMonthlyReport(String domain, Date start) {
    try {
      MonthlyReport entity = m_monthlyReportDao.findReportByDomainNamePeriod(start, domain, EventAnalyzer.ID,
            MonthlyReportEntity.READSET_FULL);
      String content = entity.getContent();

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

Examples of com.dianping.cat.core.dal.MonthlyReport

  }

  @Override
  public boolean buildMonthlyTask(String name, String domain, Date period) {
    AlertReport alertReport = queryDailyReportsByDuration(domain, period, TaskHelper.nextMonthStart(period));
    MonthlyReport report = new MonthlyReport();

    report.setContent("");
    report.setCreationDate(new Date());
    report.setDomain(domain);
    report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
    report.setName(name);
    report.setPeriod(period);
    report.setType(1);

    byte[] binaryContent = DefaultNativeBuilder.build(alertReport);

    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
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.