Get information about the current dataproc cluster created after workflow submission

Viewed 101

Suppose I run a pyspark job using a dataproc workflow template and an ephemeral cluster... How can I get the name of the cluster created inside my pyspark job

1 Answers

One way would be to fork out and run this command:

/usr/share/google/get_metadata_value attributes/dataproc-cluster-name

The only output will be the cluster name, without any new line characters or anything else to cleanup. See Running shell command and capturing the output

Related