mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-15 07:38:45 +02:00
197bf2c563
Open sourcing Aggregation Framework, a config-driven Summingbird based framework for generating real-time and batch aggregate features to be consumed by ML models.
28 lines
878 B
Scala
28 lines
878 B
Scala
package com.twitter.timelines.data_processing.ml_util.aggregation_framework
|
|
|
|
import com.twitter.ml.api.DataRecord
|
|
|
|
/**
|
|
* Keyed record that is used to reprsent the aggregation type and its corresponding data record.
|
|
*
|
|
* @constructor creates a new keyed record.
|
|
*
|
|
* @param aggregateType the aggregate type
|
|
* @param record the data record associated with the key
|
|
**/
|
|
case class KeyedRecord(aggregateType: AggregateType.Value, record: DataRecord)
|
|
|
|
/**
|
|
* Keyed record map with multiple data record.
|
|
*
|
|
* @constructor creates a new keyed record map.
|
|
*
|
|
* @param aggregateType the aggregate type
|
|
* @param recordMap a map with key of type Long and value of type DataRecord
|
|
* where the key indicates the index and the value indicating the record
|
|
*
|
|
**/
|
|
case class KeyedRecordMap(
|
|
aggregateType: AggregateType.Value,
|
|
recordMap: scala.collection.Map[Long, DataRecord])
|