
Answer-first summary for fast verification
Answer: The cluster execution mode runs the driver on a worker node within a cluster, while the client execution mode runs the driver on the client machine (also known as a gateway machine or edge node).
The primary difference between cluster and client execution modes in Apache Spark lies in the location of the driver program. In **cluster mode**, the driver runs on a worker node within the cluster, managed by the cluster manager (e.g., YARN, Kubernetes). This allows the client to disconnect after submission. In **client mode**, the driver runs on the client machine (e.g., an edge node), which means the client must remain active for the duration of the job. - **Option A** correctly states this distinction. - **Option C** is incorrect because client mode still distributes executors across worker nodes; only the driver runs locally. - **Option B**, **D**, and **E** are incorrect as they conflate execution mode with cloud/local deployments, reverse driver locations, or incorrectly describe cluster configurability. Thus, the only valid answer is **A**.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
What is the difference between cluster mode and client mode in terms of execution?
A
The cluster execution mode runs the driver on a worker node within a cluster, while the client execution mode runs the driver on the client machine (also known as a gateway machine or edge node).
B
The cluster execution mode is run on a local cluster, while the client execution mode is run in the cloud.
C
The cluster execution mode distributes executors across worker nodes in a cluster, while the client execution mode runs a Spark job entirely on one client machine.
D
The cluster execution mode runs the driver on the cluster machine (also known as a gateway machine or edge node), while the client execution mode runs the driver on a worker node within a cluster.
E
The cluster execution mode distributes executors across worker nodes in a cluster, while the client execution mode submits a Spark job from a remote machine to be run on a remote, unconfigurable cluster.
No comments yet.