Spark Workshop
  • Spark Workshops for Developers, Administrators and Operators
  • Apache Spark 2.0 / Scala Workshop and Webinars
    • plugin
      • markdown
        • Markdown Demo
    • css
      • README
  • MAIL
  • Spark Administration and Monitoring Workshop
  • Spark and Scala (Application Development) Workshop
  • exercises
    • spark-exercise-custom-ExternalClusterManager
Powered by GitBook
On this page
  • Goal
  • Steps
  • Hints
  • Solution

Was this helpful?

  1. exercises

spark-exercise-custom-ExternalClusterManager

Previousexercises

Last updated 5 years ago

Was this helpful?

Goal

The goal of the exercise is to register a custom ExternalClusterManager so scalania master URL is supported and the following works:

$ ./bin/spark-shell --master scalania
Error: Master must either be yarn or start with spark, mesos, local
Run with --help for usage help or --verbose for debug output

Steps

  1. Create a brand new Scala/sbt project

    • Use the one and only IntelliJ IDEA

    • Project name: spark-external-cluster-manager

  2. Add libraryDependencies for Spark 2.0.0 (RC5)

    • See

  3. ScalaTest

    • Follow Spark's own

Hints

  1. The custom Cluster Manager should extend

  2. The cluster manager support is loaded by . See

  3. See .

Solution

See a complete Scala/sbt project in . It is a work in progress work.

https://gist.github.com/jborkowski/a77d9cc88067feea24261479afcc4ee1
ExternalClusterManagerSuite
ExternalClusterManager
ServiceLoader.load
the code in Spark
how and where the loading happens in Spark
spark-external-cluster-manager