Package models.data

Examples of models.data.AggregateData


   * @return
   */
  public AggregateData aggregateMetricsWithGroupingNew(String nodeGroupType,
      String agentCommandType,  String timeStamp, String rawDataSourceType, String patternStr) {

    AggregateData aggregateData = null;

    try {
     
      AgentDataProvider adp = AgentDataProvider.getInstance();
      Map<String, NodeData> nodeDataMapValid = null;
     
      // default rawDataSourceType is ALL_AGENT_DATA
      if(rawDataSourceType == null || rawDataSourceType.length() ==0){
        rawDataSourceType = RawDataSourceType.ALL_AGENT_DATA.toString();
      }
     
      if(rawDataSourceType.equalsIgnoreCase(RawDataSourceType.ALL_AGENT_DATA.toString())){
       
        nodeDataMapValid = adp.allAgentData.get(
            nodeGroupType).getNodeDataMapValid();
      }else   if(rawDataSourceType.equalsIgnoreCase(RawDataSourceType.ADHOC_AGENT_DATA.toString())){
       
        nodeDataMapValid = adp.adhocAgentData.get(
            nodeGroupType).getNodeDataMapValid();
      }else if(rawDataSourceType.equalsIgnoreCase(RawDataSourceType.LOG_FILE.toString())){
       
        if(timeStamp==null){
          models.utils.LogUtils.printLogError("time stamp is NULL in aggregateMetricsWithGroupingNew.");
        }
       
        // from log
        nodeDataMapValid = LogProvider.readJsonLogToNodeDataMap(nodeGroupType, agentCommandType, timeStamp);
      }
     
     
      aggregateData = new AggregateData(nodeGroupType, agentCommandType, nodeDataMapValid);

      /**
       * KEY STEP
       */
      aggregateData.genResponseToMetadataMap(patternStr);

    } catch (Throwable t) {
      t.printStackTrace();
    }

View Full Code Here


        aggrRule = VarUtils.AGGREGATION_DEFAULT_METRIC;
      }
      patternStr = rulesMap
          .get((aggrRule == null || aggrRule.length() == 0) ? VarUtils.AGGREGATION_DEFAULT_METRIC
              : aggrRule);
      AggregateData aggregateData = ada.aggregateMetricsWithGroupingNew(
          nodeGroupType, agentCommandType, timeStamp,
          rawDataSourceType, patternStr);


      List<AggregationValueMetadata> avmList = aggregateData
          .getResponseToMetadataList();

      Map<String, String> aggregationMap = aggregateData
          .getValueCountAggregationMap();

      AggregationResponse aggregationResponse = new AggregationResponse(aggregationMap, avmList);
     
      responseText = AgentUtils.renderJson(aggregationResponse);
View Full Code Here

     
      if(aggrRule==null){
        aggrRule=VarUtils.AGGREGATION_DEFAULT_METRIC;
      }
      patternStr = rulesMap.get(   (aggrRule==null || aggrRule.length()==0 ) ?VarUtils.AGGREGATION_DEFAULT_METRIC:aggrRule);
      AggregateData aggregateData = ada.aggregateMetricsWithGroupingNew(
          nodeGroupType, agentCommandType, timeStamp, rawDataSourceType, patternStr);

      String pieDataStr = null;

      boolean humanReadFriendly = false;
     
      List<AggregationValueMetadata> avmList = aggregateData
          .getResponseToMetadataList();

      if(!textOnly){
       
        pieDataStr = aggregateData.getValueCountJSNumber2D(humanReadFriendly);
       
        render(page, topnav, pieDataStr, avmList, agentCommandType,
            nodeGroupType, lastRefreshed, patternStr, timeStamp, rawDataSourceType, rulesMap, aggrRule);
      }else{
       
        String avmListString = AgentUtils.renderJson(avmList);
        humanReadFriendly = true;
        pieDataStr = aggregateData.getValueCountJSNumber2D(humanReadFriendly);
       
       
        StringBuilder finalResponse = new StringBuilder( "//SUPERMAN*****OVERVIEW -- AGGREGATION SUMMARY - START *************\n\n");
        finalResponse.append(pieDataStr);
        finalResponse.append( "\n\n//SUPERMAN*****OVERVIEW -- AGGREGATION SUMMARY - END *************\n\n");
 
View Full Code Here

     
      AgentDataAggregator ada = AgentDataAggregator.getInstance();

     
     
      AggregateData aggregateData = ada.aggregateMetricsWithGroupingNew(
          nodeGroupType, agentCommandType, timeStamp, rawDataSourceType, patternStr);

      String nodeListDetails = aggregateData.getResponseToMetadataMap()
          .get(value).nodeListDetailsStr();

      renderText(nodeListDetails);
    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of models.data.AggregateData

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.