A. Execute their pyspark shell with the option --remote "https://localhost"
B. Execute their pyspark shell with the option --remote "sc://localhost"
C. Set the environment variable SPARK_REMOTE="sc://localhost" before starting the pyspark shell
D. Add .remote("sc://localhost") to their SparkSession.builder calls in their Spark code
E. Ensure the Spark property spark.connect.grpc.binding.port is set to 15002 in the application code
Explanation:
Spark Connect enables decoupling of the client and Spark driver processes, allowing remote access.
Spark supports configuring the remote Spark Connect server in multiple ways:
From Databricks and Spark documentation:
Option B (--remote "sc://localhost") is a valid command-line argument for the pyspark shell to connect using Spark Connect.
Option C (setting SPARK_REMOTE environment variable) is also a supported method to configure the remote endpoint.
Option A is incorrect because Spark Connect uses the sc:// protocol, not https://.
Option D requires modifying the code, which the question explicitly avoids.
Option E configures the port on the server side but doesn’t start a client connection.
Final Answers: B and C