Package com.dianping.cat.config.app

Examples of com.dianping.cat.config.app.QueryEntity


  private double queryOneDayDelay4Command(Date yesterday, String url) {
    String yesterdayStr = m_sdf.format(yesterday);
    Integer command = m_appConfigManager.getCommands().get(url);

    if (command != null) {
      QueryEntity entity = new QueryEntity(yesterdayStr + ";" + command + ";;;;;;;;;");

      return m_appDataService.queryOneDayDelayAvg(entity);
    } else {
      throw new RuntimeException("Unrecognized command configuration in app comparison config, command id: " + url);
    }
View Full Code Here


    return m_query2;
  }

  public QueryEntity getQueryEntity1() {
    if (m_query1 != null && m_query1.length() > 0) {
      return new QueryEntity(m_query1);
    } else {
      return new QueryEntity();
    }
  }
View Full Code Here

    }
  }

  public QueryEntity getQueryEntity2() {
    if (m_query2 != null && m_query2.length() > 0) {
      return new QueryEntity(m_query2);
    } else {
      return null;
    }
  }
View Full Code Here

    return null;
  }

  private Pair<LineChart, List<AppDataSpreadInfo>> buildLineChart(Model model, Payload payload,
        AppDataGroupByField field, String sortBy) {
    QueryEntity linechartEntity1 = payload.getQueryEntity1();
    QueryEntity linechartEntity2 = payload.getQueryEntity2();
    String type = payload.getType();

    try {
      filterCommands(model, payload.isShowActivity());
View Full Code Here

    int startMinute = endMinute - minute;
    double[] datas = null;

    if (startMinute < 0 && endMinute < 0) {
      String period = m_sdf.format(queryDayPeriod(-1).getTime());
      QueryEntity queryEntity = new QueryEntity(period + ";" + conditions + ";;");
      datas = ArrayUtils.toPrimitive(m_appDataService.queryValue(queryEntity, type), 0);
    } else if (startMinute < 0 && endMinute >= 0) {
      String last = m_sdf.format(queryDayPeriod(-1).getTime());
      String current = m_sdf.format(queryDayPeriod(0).getTime());
      QueryEntity lastQueryEntity = new QueryEntity(last + ";" + conditions + ";;");
      QueryEntity currentQueryEntity = new QueryEntity(current + ";" + conditions + ";;");
      double[] lastDatas = ArrayUtils.toPrimitive(m_appDataService.queryValue(lastQueryEntity, type), 0);
      double[] currentDatas = ArrayUtils.toPrimitive(m_appDataService.queryValue(currentQueryEntity, type), 0);
      datas = mergerArray(lastDatas, currentDatas);
    } else if (startMinute >= 0) {
      String period = m_sdf.format(queryDayPeriod(0).getTime());
      QueryEntity queryEntity = new QueryEntity(period + ";" + conditions + ";;");
      datas = ArrayUtils.toPrimitive(m_appDataService.queryValue(queryEntity, type), 0);
    }
    return datas;
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.config.app.QueryEntity

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.