All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.hydrosphere.mist.jobs.runners.python.wrappers.SparkStreamingWrapper.scala Maven / Gradle / Ivy

package io.hydrosphere.mist.jobs.runners.python.wrappers

import io.hydrosphere.mist.MistConfig
import io.hydrosphere.mist.contexts.ContextWrapper
import io.hydrosphere.mist.lib.StreamingSupport
import org.apache.spark.streaming.api.java.JavaStreamingContext

private[mist] class SparkStreamingWrapper(contextWrapper: ContextWrapper) extends StreamingSupport {
  _sc = contextWrapper.context
  def setStreamingContext(ssc: JavaStreamingContext): Unit = {
    _ssc = ssc.ssc
  }

  def getDurationSeconds: Int = {
    (MistConfig.Contexts.streamingDuration(_sc.appName).milliseconds/1000).toInt
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy