What are AssemblyKeys used for, and how to import them?

jayunit100

In a recent popular sbt app https://github.com/databricks/reference-apps, I found a line that required me to

import AssemblyKeys._ 

This line doesn't compile in SBT or in my IntelliJ IDEA.

What is the import used for and why is it necessary?

Jacek Laskowski

The other answer by @mfirry pretty much answers what part of the build (definition) brings import AssemblyKeys._. It's the sbt-assembly plugin that (quoting the docs of the plugin):

Create a fat JAR of your project with all of its dependencies.

It's needed by the plugin to do its job.

You may ask yourself why I would need the plugin at all.

Since you didn't reference the application that requires the import and hence the plugin, and I didn't review the examples, either, I can only guess by the company Databricks that's the commercial entity behind Apache Spark the examples use.

In order to deploy an application onto a cluster of Apache Spark you need to assemble the entire application and configure the workers so they can access the binaries (with the necessary dependencies, namely jars). That's the aim of the sbt-assembly plugin to pack all up and offer a single application jar so Spark can use. See Standalone Applications in the documentation of Apache Spark to read about the standalone case (no cluster environment):

For sbt to work correctly, we’ll need to layout SimpleApp.scala and simple.sbt according to the typical directory structure. Once that is in place, we can create a JAR package containing the application’s code, then use the spark-submit script to run our program.

You may want to read Cluster Mode Overview to have an overview of how to deploy a Spark application onto a Spark cluster.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

From Dev

Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

From Dev

What's the order Python used to import module?

From Dev

What are submodules and how are they used?

From Dev

What is decltype and how is it used?

From Dev

What is a cookbook? and how is it used?

From Java

What is polymorphism, what is it for, and how is it used?

From Dev

How to create separate files for functions, then import them?

From Dev

what type of database should be used to store millions of restaurants and query them

From Dev

What is rake and how it is used in rails?

From Dev

What is OpenStack? And how can it be used?

From Dev

What is a responsive site, why use them, and how to develop them?

From Java

What are customization point objects and how to use them?

From Dev

What are "watches" in IntelliJ and how to use them?

From Dev

What are ResourceContainers and how to use them for Cloud Endpoints?

From Dev

What is cufon and canvas and how to overwrite them

From Dev

TensorFlow strings: what they are and how to work with them

From Dev

What are PPAs and how do I use them?

From Dev

What are PPAs and how do I use them?

From Dev

What is Binary package? How to build them?

From Dev

Tags or function in netbeans ? What are they and how to use them?

From Dev

What operations are time consuming and how to avoid them?

From Dev

What is combinator and how to write them in java

From Dev

What are these boxes and how do I remove them?

From Dev

How to determine all the default ports used by Hadoop and change all of them?

From Dev

how to list the partition, which are minimum 50% of them are used

From Dev

React Native: How to split a file up into multiple files and import them?

From Dev

".c" files called by fiona. How to import them?

From Dev

How can I parse using URLSession and import them in an array in Swift?

Related Related

  1. 1

    Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

  2. 2

    Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

  3. 3

    What's the order Python used to import module?

  4. 4

    What are submodules and how are they used?

  5. 5

    What is decltype and how is it used?

  6. 6

    What is a cookbook? and how is it used?

  7. 7

    What is polymorphism, what is it for, and how is it used?

  8. 8

    How to create separate files for functions, then import them?

  9. 9

    what type of database should be used to store millions of restaurants and query them

  10. 10

    What is rake and how it is used in rails?

  11. 11

    What is OpenStack? And how can it be used?

  12. 12

    What is a responsive site, why use them, and how to develop them?

  13. 13

    What are customization point objects and how to use them?

  14. 14

    What are "watches" in IntelliJ and how to use them?

  15. 15

    What are ResourceContainers and how to use them for Cloud Endpoints?

  16. 16

    What is cufon and canvas and how to overwrite them

  17. 17

    TensorFlow strings: what they are and how to work with them

  18. 18

    What are PPAs and how do I use them?

  19. 19

    What are PPAs and how do I use them?

  20. 20

    What is Binary package? How to build them?

  21. 21

    Tags or function in netbeans ? What are they and how to use them?

  22. 22

    What operations are time consuming and how to avoid them?

  23. 23

    What is combinator and how to write them in java

  24. 24

    What are these boxes and how do I remove them?

  25. 25

    How to determine all the default ports used by Hadoop and change all of them?

  26. 26

    how to list the partition, which are minimum 50% of them are used

  27. 27

    React Native: How to split a file up into multiple files and import them?

  28. 28

    ".c" files called by fiona. How to import them?

  29. 29

    How can I parse using URLSession and import them in an array in Swift?

HotTag

Archive