Class MostViewedEntitiesAggregator<A,B,M,S>

java.lang.Object
org.openmetadata.service.dataInsight.MostViewedEntitiesAggregator<A,B,M,S>
All Implemented Interfaces:
DataInsightAggregatorInterface
Direct Known Subclasses:
ElasticSearchMostViewedEntitiesAggregator, OpenSearchMostViewedEntitiesAggregator

public abstract class MostViewedEntitiesAggregator<A,B,M,S> extends Object implements DataInsightAggregatorInterface
  • Field Details

    • aggregations

      protected final A aggregations
  • Constructor Details

    • MostViewedEntitiesAggregator

      protected MostViewedEntitiesAggregator(A aggregations)
  • Method Details

    • aggregate

      public List<Object> aggregate()
      Specified by:
      aggregate in interface DataInsightAggregatorInterface
    • getValue

      protected abstract Double getValue(S sumPageViews)
    • getBucketAggregation

      protected abstract M getBucketAggregation(B bucket, String key)
    • getAggregations

      protected abstract S getAggregations(B bucket, String key)
    • getKeyAsString

      protected abstract String getKeyAsString(B bucket)
    • getBuckets

      protected abstract List<? extends B> getBuckets(M bucket)
    • getEntityFqnBuckets

      protected abstract M getEntityFqnBuckets(A aggregations)
    • getFirstValueFromBucketOrNull

      protected String getFirstValueFromBucketOrNull(M bucket)