Class AggregationRouter

java.lang.Object
org.apache.pekko.actor.AbstractActor
com.arpnetworking.clusteraggregator.aggregation.AggregationRouter
All Implemented Interfaces:
org.apache.pekko.actor.Actor

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

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Message to request shutdown of aggregation router and subordinate streaming aggregator actor pair.

    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
    AggregationRouter(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.AbstractActor

    aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, 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
  • Constructor Details

    • AggregationRouter

      @Inject public AggregationRouter(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