Cloud Dataproc sets special metadata values for the instances that run in your cluster:
|Name of the cluster's staging bucket|
|Region of the cluster's endpoint|
|Number of worker nodes in the cluster. The value is |
|Name of the cluster|
|UUID of the cluster|
|Instance's role, either |
|Hostname of the first master node. The value is either |
|Comma-separated list of hostnames for the additional master nodes in a high-availability cluster, for example, |
You can use these values to customize the behavior of initialization actions.
gcloud dataproc clusters create cluster-name \ --metadata name1=value1,name2=value2... \ ... other flags ...