I have a Spark 2 application that uses grpc so that client applications can connect to it.
However, I want the grpc code only to be started on the driver node and not on the workers.
Is there a possibility in Spark 2 to check if the node the code is currently running on is the driver node?