initialization Actions
Parameters
Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role
metadata to run an executable on a master or worker node, as shown below using curl
(you can also use wget
): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if ; then ... master specific actions ... else ... worker specific actions ... fi
Parameters
Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role
metadata to run an executable on a master or worker node, as shown below using curl
(you can also use wget
): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if ; then ... master specific actions ... else ... worker specific actions ... fi
Parameters
Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role
metadata to run an executable on a master or worker node, as shown below using curl
(you can also use wget
): ROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role) if ; then ... master specific actions ... else ... worker specific actions ... fi