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

tech.ytsaurus.spark.launcher.rest.ScalatraBootstrap.scala Maven / Gradle / Ivy

The newest version!
package tech.ytsaurus.spark.launcher.rest

import javax.servlet.ServletContext
import org.scalatra.LifeCycle

class ScalatraBootstrap extends LifeCycle {
  override def init(context: ServletContext) {
    val sparkMasterEndpoint = context.getInitParameter(masterEndpointParam)
    val sparkByopEnabled = context.getInitParameter(byopEnabledParam).toBoolean
    val sparkByopPort = if (sparkByopEnabled) Some(context.getInitParameter(byopPortParam).toInt) else None
    context.mount(new MasterWrapperServlet(sparkMasterEndpoint, sparkByopPort), "/*")
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy