Package com.dianping.cat.core.dal

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


  }

  @Override
  public CrossReport queryWeeklyReport(String domain, Date start) {
    try {
      WeeklyReport entity = m_weeklyReportDao.findReportByDomainNamePeriod(start, domain, CrossAnalyzer.ID,
            WeeklyReportEntity.READSET_FULL);
      String content = entity.getContent();

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


  @Override
  public boolean buildWeeklyTask(String name, String domain, Date period) {
    ServiceReport serviceReport = queryDailyReportsByDuration(domain, period, new Date(period.getTime()
          + TimeHelper.ONE_WEEK));
    WeeklyReport report = new WeeklyReport();

    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(serviceReport);
    return m_reportService.insertWeeklyReport(report, binaryContent);
  }
View Full Code Here

  }

  @Override
  public ProblemReport queryWeeklyReport(String domain, Date start) {
    try {
      WeeklyReport entity = m_weeklyReportDao.findReportByDomainNamePeriod(start, domain, ProblemAnalyzer.ID,
            WeeklyReportEntity.READSET_FULL);
      String content = entity.getContent();

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

  }

  @Override
  public TransactionReport queryWeeklyReport(String domain, Date start) {
    try {
      WeeklyReport entity = m_weeklyReportDao.findReportByDomainNamePeriod(start, domain, TransactionAnalyzer.ID,
            WeeklyReportEntity.READSET_FULL);
      String content = entity.getContent();

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

  }

  @Override
  public HeavyReport queryWeeklyReport(String domain, Date start) {
    try {
      WeeklyReport entity = m_weeklyReportDao.findReportByDomainNamePeriod(start, domain, Constants.REPORT_HEAVY,
            WeeklyReportEntity.READSET_FULL);
      String content = entity.getContent();

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

TOP

Related Classes of com.dianping.cat.core.dal.WeeklyReport

Copyright © 2018 www.massapicom. 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.