mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
14 lines
441 B
Scala
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
|
||
|
}
|