initializationActions property

List<NodeInitializationAction>? initializationActions
getter/setter pair

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 [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi

Optional.

Implementation

core.List<NodeInitializationAction>? initializationActions;