the-algorithm/timelines/data_processing/ml_util/aggregation_framework/StoreRegister.scala
twitter-team 197bf2c563 Open-sourcing Timelines Aggregation Framework
Open sourcing Aggregation Framework, a config-driven Summingbird based framework for generating real-time and batch aggregate features to be consumed by ML models.
2023-04-28 14:17:02 -05:00

14 lines
441 B
Scala

package com.twitter.timelines.data_processing.ml_util.aggregation_framework
trait StoreRegister {
def allStores: Set[StoreConfig[_]]
lazy val storeMap: Map[AggregateType.Value, StoreConfig[_]] = allStores
.map(store => (store.aggregateType, store))
.toMap
lazy val storeNameToTypeMap: Map[String, AggregateType.Value] = allStores
.flatMap(store => store.storeNames.map(name => (name, store.aggregateType)))
.toMap
}