Skip to content

Instantly share code, notes, and snippets.

@blvp
Last active May 16, 2018 11:57
Show Gist options
  • Select an option

  • Save blvp/4ac4da7d87f9abe017eae8c9b94676d0 to your computer and use it in GitHub Desktop.

Select an option

Save blvp/4ac4da7d87f9abe017eae8c9b94676d0 to your computer and use it in GitHub Desktop.
object ScalingFactorFunc extends MistFn {
implicit val sfDailyOutMessageEnc = mist.api.encoding.generic.encoder[ScalingFactorDailyOutMessage]
implicit val sfCommonConfigExt = mist.api.encoding.generic.extractor[CommonConfig]
implicit val sfDailyInMessageExt = mist.api.encoding.generic.extractor[ScalingFactorDailyInMessage]
implicit val sfConfigExt = mist.api.encoding.generic.extractor[ScalingFactorConfig]
def handle: Handle = withArgs(
arg[CommonConfig]("cfg"),
arg[ScalingFactorDailyInMessage]("params"),
arg[ScalingFactorConfig]("sfCfg")
).withMistExtras
.onSparkSession(
(cfg: CommonConfig,
params: ScalingFactorDailyInMessage,
sfCfg: ScalingFactorConfig,
extras: MistExtras,
sparkSession: SparkSession) => {
val result: ScalingFactorDailyOutMessage = ???
result
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment