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

org.apache.spark.deploy.master.YtRecoveryModeFactory.scala Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package org.apache.spark.deploy.master

import org.apache.spark.SparkConf
import org.apache.spark.serializer.Serializer
import tech.ytsaurus.spyt.fs.YtClientConfigurationConverter.ytClientConfiguration
import tech.ytsaurus.spyt.wrapper.client.YtClientProvider

class YtRecoveryModeFactory(conf: SparkConf, serializer: Serializer)
  extends StandaloneRecoveryModeFactory(conf, serializer) {

  override def createPersistenceEngine(): PersistenceEngine = {
    val yt = YtClientProvider.ytClient(ytClientConfiguration(conf))
    new YtPersistenceEngine(conf.get("spark.deploy.yt.path"), serializer)(yt)
  }

  override def createLeaderElectionAgent(master: LeaderElectable): LeaderElectionAgent = {
    new MonarchyLeaderAgent(master)
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy