Class StreamingAggregator

java.lang.Object
org.apache.pekko.actor.AbstractActor
org.apache.pekko.actor.AbstractActorWithTimers
com.arpnetworking.clusteraggregator.aggregation.StreamingAggregator
All Implemented Interfaces:
org.apache.pekko.actor.Actor, org.apache.pekko.actor.Timers

public class StreamingAggregator extends org.apache.pekko.actor.AbstractActorWithTimers
Actual actor responsible for aggregating.
Author:
Brandon Arp (brandon dot arp at inscopemetrics dot com)
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.pekko.actor.AbstractActor

    org.apache.pekko.actor.AbstractActor.ActorContext, org.apache.pekko.actor.AbstractActor.Receive

    Nested classes/interfaces inherited from interface org.apache.pekko.actor.Actor

    org.apache.pekko.actor.Actor.emptyBehavior$, org.apache.pekko.actor.Actor.ignoringBehavior$
  • Constructor Summary

    Constructors
    Constructor
    Description
    StreamingAggregator(org.apache.pekko.actor.ActorRef periodicStatistics, org.apache.pekko.actor.ActorRef emitter, String clusterHostSuffix, com.google.common.collect.ImmutableSet<String> reaggregationDimensions, boolean injectClusterAsHost, Duration aggregatorTimeout, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
    Public constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.pekko.actor.AbstractActor.Receive
     
    void
     
    void
    preRestart(Throwable reason, Optional<Object> message)
     
    void
     
    static org.apache.pekko.actor.Props
    props(org.apache.pekko.actor.ActorRef metricsListener, org.apache.pekko.actor.ActorRef emitter, String clusterHostSuffix, com.google.common.collect.ImmutableSet<String> reaggregationDimensions, boolean injectClusterAsHost, Duration aggregatorTimeout, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
    Creates a Props for use in Pekko.

    Methods inherited from class org.apache.pekko.actor.AbstractActorWithTimers

    aroundPostStop, aroundPreRestart, aroundReceive, getTimers, org$apache$pekko$actor$Timers$_setter_$org$apache$pekko$actor$Timers$$_timers_$eq, org$apache$pekko$actor$Timers$$_timers, timers

    Methods inherited from class org.apache.pekko.actor.AbstractActor

    aroundPostRestart, aroundPreStart, context, emptyBehavior, getContext, getSelf, getSender, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, preRestart, receive, receiveBuilder, self, sender, supervisorStrategy, unhandled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.pekko.actor.Actor

    aroundPostRestart, aroundPreStart, context, org$apache$pekko$actor$Actor$_setter_$context_$eq, org$apache$pekko$actor$Actor$_setter_$self_$eq, postRestart, preRestart, receive, self, sender, supervisorStrategy, unhandled
  • Constructor Details

    • StreamingAggregator

      @Inject public StreamingAggregator(org.apache.pekko.actor.ActorRef periodicStatistics, org.apache.pekko.actor.ActorRef emitter, String clusterHostSuffix, com.google.common.collect.ImmutableSet<String> reaggregationDimensions, boolean injectClusterAsHost, Duration aggregatorTimeout, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
      Public constructor.
      Parameters:
      periodicStatistics - Where to send metrics about aggregation computations.
      emitter - Where to send the metrics data.
      clusterHostSuffix - The suffix to append to the hostname for cluster aggregations.
      reaggregationDimensions - The dimensions to reaggregate over.
      injectClusterAsHost - Whether to inject a host dimension based on cluster.
      aggregatorTimeout - The time to wait from the start of the period for all data.
      periodicMetrics - The PeriodicMetrics instance.
  • Method Details

    • props

      public static org.apache.pekko.actor.Props props(org.apache.pekko.actor.ActorRef metricsListener, org.apache.pekko.actor.ActorRef emitter, String clusterHostSuffix, com.google.common.collect.ImmutableSet<String> reaggregationDimensions, boolean injectClusterAsHost, Duration aggregatorTimeout, com.arpnetworking.metrics.incubator.PeriodicMetrics periodicMetrics)
      Creates a Props for use in Pekko.
      Parameters:
      metricsListener - Where to send metrics about aggregation computations.
      emitter - Where to send the metrics data.
      clusterHostSuffix - The suffix to append to the hostname for cluster aggregations.
      reaggregationDimensions - The dimensions to reaggregate over.
      injectClusterAsHost - Whether to inject a host dimension based on cluster.
      aggregatorTimeout - The time to wait from the start of the period for all data.
      periodicMetrics - The PeriodicMetrics instance.
      Returns:
      A new Props.
    • createReceive

      public org.apache.pekko.actor.AbstractActor.Receive createReceive()
      Specified by:
      createReceive in class org.apache.pekko.actor.AbstractActor
    • preStart

      public void preStart()
      Specified by:
      preStart in interface org.apache.pekko.actor.Actor
      Overrides:
      preStart in class org.apache.pekko.actor.AbstractActor
    • postStop

      public void postStop()
      Specified by:
      postStop in interface org.apache.pekko.actor.Actor
      Overrides:
      postStop in class org.apache.pekko.actor.AbstractActor
    • preRestart

      public void preRestart(Throwable reason, Optional<Object> message) throws Exception
      Overrides:
      preRestart in class org.apache.pekko.actor.AbstractActor
      Throws:
      Exception