Free Databricks-Certified-Associate-Developer-for-Apache-Spark-3.5 Actual Exam Questions - Question 7 Discussion
What are the two alternative ways the developer can start a local Spark Connect server without
changing their existing application code? (Choose 2 answers)
B and A, since both --remote options start a local server without code changes.
A imo, since --remote "https://localhost" can also trigger a local Spark Connect server for testing. D and E require code changes, so they don’t fit the "without changing code" part.
B sounds right since it uses the proper sc:// protocol to launch Spark Connect locally.
The question wants ways to start the server locally without code changes. B definitely starts a local server via pyspark with --remote. C just sets an env var, which likely only directs connection, not start. So B plus something else, maybe A if it’s the right protocol?
B/C? B uses the right protocol for Spark Connect, and C sets an env var which should trigger the connection without code edits. A and D both need code or wrong protocols, so they can’t start the server locally.
Maybe B and C make sense because both let you start the pyspark shell pointing to a local Spark Connect server without modifying application code. D requires code changes, so it's out.
C imo, setting the environment variable should work without touching the app code. B also seems right since it’s about running pyspark with the remote URL using the correct sc:// protocol. A uses https:// which doesn’t fit Spark Connect’s usual scheme, and D definitely requires code changes. E’s port setting alone won’t start the server, just configure it, so that one feels off too.
I think B and C are the best picks here since they let you run Spark Connect locally without changing the app code directly. A and D seem more about code changes or different protocols.