I have a spark cluster that consists of a master and two worker nodes.
When executing the following code to extract data from a database, the actual execution is carried out by the master not one of the workers.
sparkSession.read
.format("jdbc")
.option("url", jdbcURL)
.option("user", user)
.option("query", query)
.option("driver", driverClass)
.option("fetchsize", fetchsize)
.option("numPartitions", numPartitions)
.option("queryTimeout", queryTimeout)
.options(options)
.load()
Is this an expected behavior?
Is there some way to disable this behavior?