the-algorithm/timelines/data_processing/ml_util/aggregation_framework/heron/NighthawkUnderlyingStoreConfig.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

32 lines
1.2 KiB
Scala

package com.twitter.timelines.data_processing.ml_util.aggregation_framework.heron
import com.twitter.conversions.DurationOps._
import com.twitter.finagle.mtls.authentication.EmptyServiceIdentifier
import com.twitter.finagle.mtls.authentication.ServiceIdentifier
import com.twitter.finagle.ssl.OpportunisticTls
import com.twitter.storehaus_internal.nighthawk_kv.CacheClientNighthawkConfig
import com.twitter.storehaus_internal.util.TTL
import com.twitter.storehaus_internal.util.TableName
import com.twitter.summingbird_internal.runner.store_config.OnlineStoreOnlyConfig
import com.twitter.util.Duration
case class NighthawkUnderlyingStoreConfig(
serversetPath: String = "",
tableName: String = "",
cacheTTL: Duration = 1.day)
extends OnlineStoreOnlyConfig[CacheClientNighthawkConfig] {
def online: CacheClientNighthawkConfig = online(EmptyServiceIdentifier)
def online(
serviceIdentifier: ServiceIdentifier = EmptyServiceIdentifier
): CacheClientNighthawkConfig =
CacheClientNighthawkConfig(
serversetPath,
TableName(tableName),
TTL(cacheTTL),
serviceIdentifier = serviceIdentifier,
opportunisticTlsLevel = OpportunisticTls.Required
)
}