Examples of MonthlyReport


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

            overload.setReportId(reportId);
            overload.setReportSize(contentLength);
            overload.setReportType(CapacityUpdater.MONTHLY_TYPE);

            try {
              MonthlyReport report = m_monthlyReportDao.findByPK(reportId, MonthlyReportEntity.READSET_FULL);
              overload.setPeriod(report.getPeriod());
              m_overloadDao.insert(overload);
            } catch (DalNotFoundException e) {
            } catch (Exception e) {
              Cat.logError(e);
            }
View Full Code Here

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

  }

  @Override
  public boolean insertMonthlyReport(MonthlyReport report, byte[] content) {
    try {
      MonthlyReport monthReport = m_monthlyReportDao.findReportByDomainNamePeriod(report.getPeriod(),
            report.getDomain(), report.getName(), MonthlyReportEntity.READSET_FULL);

      if (monthReport != null) {
        MonthlyReportContent reportContent = m_monthlyReportContentDao.createLocal();

        reportContent.setKeyReportId(monthReport.getId());
        reportContent.setReportId(monthReport.getId());
        m_monthlyReportDao.deleteReportByDomainNamePeriod(report);
        m_monthlyReportContentDao.deleteByPK(reportContent);
      }
    } 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) {
    CrossReport crossReport = 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(crossReport);
    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) {
    EventReport eventReport = 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(eventReport);
    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) {
    TransactionReport transactionReport = 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(transactionReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

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

  }

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

      if (content != null && content.length() > 0) {
        return com.dianping.cat.home.bug.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) {
    HeavyReport heavyReport = 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(heavyReport);
    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) {
    MatrixReport matrixReport = 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(matrixReport);
    return m_reportService.insertMonthlyReport(report, binaryContent);
  }
View Full Code Here

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

  }

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

      if (content != null && content.length() > 0) {
        return com.dianping.cat.consumer.matrix.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

  private ServerConfigManager m_configManger;

  private Logger m_logger;

  private MonthlyReport buildMonthlyReport(String domain, Date period, String name) {
    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);
    return report;
  }
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.