官术网_书友最值得收藏!

Spark clusters

A Spark cluster is made up of two types of processes: a driver program and multiple executors. In the local mode, all these processes are run within the same JVM. In a cluster, these processes are usually run on separate nodes.

For example, a typical cluster that runs in Spark's standalone mode (that is, using Spark's built-in cluster management modules) will have the following:

  • A master node that runs the Spark standalone master process as well as the driver program
  • A number of worker nodes, each running an executor process

While we will be using Spark's local standalone mode throughout this book to illustrate concepts and examples, the same Spark code that we write can be run on a Spark cluster. In the preceding example, if we run the code on a Spark standalone cluster, we could simply pass in the URL for the master node, as follows:

  $ MASTER=spark://IP:PORT --class org.apache.spark.examples.SparkPi 
./examples/jars/spark-examples_2.11-2.0.0.jar 100

Here, IP is the IP address and PORT is the port of the Spark master. This tells Spark to run the program on the cluster where the Spark master process is running.

A full treatment of Spark's cluster management and deployment is beyond the scope of this book. However, we will briefly teach you how to set up and use an Amazon EC2 cluster later in this chapter.

For an overview of the Spark cluster-application deployment, take a look at the following links:

主站蜘蛛池模板: 大石桥市| 特克斯县| 绥宁县| 山丹县| 肃宁县| 西青区| 阳原县| 通渭县| 叙永县| 桑植县| 沂源县| 阿瓦提县| 福贡县| 天柱县| 长汀县| 应用必备| 南川市| 怀远县| 射洪县| 锡林浩特市| 深水埗区| 海门市| 改则县| 株洲县| 永寿县| 巴东县| 兰考县| 丹棱县| 喀什市| 金沙县| 洛扎县| 南华县| 新乐市| 平顺县| 多伦县| 蒙阴县| 聊城市| 莱州市| 泰兴市| 搜索| 上林县|