Uploaded image for project: 'Apache Apex Core'
  1. Apache Apex Core
  2. APEXCORE-102

AppDataPushAgent Not Adding timeBuckets and dimensionsAggregators

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • None

    Description

      Chinmay found the following issue

      When settings a DimensionsScheme App Data Tracker doesn't pickup the timebuckets or aggregators. The DimensionsScheme is as follows

      public static class IngestionDimensionsSchema implements AutoMetric.DimensionsScheme, Serializable
      {
      private static final long serialVersionUID = 20150910103301L;

      public String[] getTimeBuckets()
      {
      return new String[]

      {"1s", "1m"}

      ;
      }

      public String[] getDimensionAggregationsFor(String logicalMetricName)
      {
      return new String[]

      {"LAST"}

      ;
      }
      }

      chinmay [9:21 PM]
      And then dag.setAttribute(tracker, Context.OperatorContext.METRICS_DIMENSIONS_SCHEME, new IngestionDimensionsSchema());

      I saw that the Schema being sent out was as follows

      "data":{
      "type":"metricsSchema",
      "version":"1.0",
      "appUser":"chinmay",
      "appName":"Ingestion",
      "logicalOperatorName":"Tracker",
      "values":[

      { "name":"eventCounts", "type":"long", "dimensionAggregators":"[Ljava.lang.String;@1b12a6b8" }

      ],
      "timeBuckets":"[Ljava.lang.String;@657f87ea"

      Chinmay saw in AppDataPushAgent line 271

      String[] timeBuckets = metricAggregatorMeta.getTimeBuckets();
      if (timeBuckets != null)

      { result.put("timeBuckets", timeBuckets); }

      result is a JSONObject... It should have created a JSONArray of it and then done result.put

      Attachments

        Activity

          People

            csingh Chandni Singh
            timothyfarkas Timothy Farkas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment