Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina spiega come aggiornare ed eliminare un cluster Dataproc esistente.
Aggiorna un cluster
Puoi aggiornare un cluster inviando una richiesta clusters.patch dell'API Dataproc, eseguendo un comando gcloud dataproc clusters update in una finestra del terminale locale o in Cloud Shell oppure modificando i parametri del cluster dalla scheda Configurazione della pagina Dettagli cluster per il cluster nella Google Cloud console.
È possibile aggiornare i seguenti parametri del cluster:
il numero di nodi worker standard in un cluster. Vedi
Scalare i cluster
il numero di nodi worker secondari in un cluster. Vedi
VM prerilasciabili.
se utilizzare il
ritiro controllato
per controllare l'arresto di un worker dopo il completamento dei relativi job
Dataproc genera un errore ERROR_DUE_TO_UPDATE quando un'operazione di aggiornamento del cluster non riesce. Questo errore inserisce il cluster in uno stato di sicurezza per evitare la perdita di dati e limita ulteriori operazioni del cluster: i job possono continuare a essere inviati al cluster, il cluster può essere eliminato, ma non sono consentite ulteriori operazioni di aggiornamento del cluster.
Consiglio: dopo aver ricevuto un ERROR_DUE_TO_UPDATE su un cluster,
ricrea il cluster
esportando la configurazione del cluster per crearne uno nuovo, quindi elimina il cluster
non riuscito. Se la ricreazione del cluster non va a buon fine, contatta
l'assistenza clienti Google Cloud per ricevere aiuto per ripristinare il cluster a uno stato
RUNNING.
Elimina un cluster
Puoi eliminare un cluster tramite una richiesta HTTP o programmatica dell'API Dataproc
clusters.delete, utilizzando lo strumento a riga di comando Google Cloud CLI
gcloud
localmente in una finestra del terminale o in Cloud Shell oppure dalla consoleGoogle Cloud .
Utilizza l'API Dataproc
clusters.delete
per eliminare un cluster.
Console
Apri la pagina
Cluster
di Dataproc nella console Google Cloud . Seleziona il cluster selezionando la casella
a sinistra del nome del cluster, poi fai clic su Elimina per
eliminarlo.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eDataproc clusters can be updated through the Dataproc API, the \u003ccode\u003egcloud\u003c/code\u003e command-line tool, or the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eUpdatable cluster parameters include the number of standard or secondary worker nodes, graceful decommissioning settings, and cluster labels.\u003c/p\u003e\n"],["\u003cp\u003eDeleting a Dataproc cluster can be accomplished using the Dataproc API, the \u003ccode\u003egcloud\u003c/code\u003e CLI tool, or the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eCluster deletion is irreversible; once a cluster is deleted, it cannot be recovered.\u003c/p\u003e\n"]]],[],null,["This page explains how to update and delete an existing Dataproc cluster.\n\nUpdate a cluster\n\nYou can update a cluster by issuing a Dataproc API\n[clusters.patch](/dataproc/docs/reference/rest/v1/projects.regions.clusters/patch) request, running\na [gcloud dataproc clusters update](/sdk/gcloud/reference/dataproc/clusters/update)\ncommand in a local terminal window or in\n[Cloud Shell](https://console.cloud.google.com/?cloudshell=true), or by editing cluster\nparameters from the Configuration tab of the Cluster details page for the\ncluster in the [Google Cloud console](https://console.cloud.google.com/dataproc/clusters).\n\nThe following cluster parameters can be updated:\n\n- the number of standard worker nodes in a cluster---see [Scaling clusters](/dataproc/docs/concepts/scaling-clusters)\n- the number of secondary worker nodes in a cluster--- see [Preemptible VMs](/dataproc/docs/concepts/preemptible-vms)\n- whether to use [graceful decommissioning](/dataproc/docs/concepts/configuring-clusters/scaling-clusters#graceful_decommissioning) to control shutting down a worker after its jobs are completed\n- adding or deleting cluster [labels](/dataproc/docs/concepts/labels)\n\nCluster update error\n\nDataproc issues an `ERROR_DUE_TO_UPDATE` error when a cluster\nupdate operation fails. This error places the cluster in a fail-safe state to\navoid data loss, and restricts further cluster operations: jobs can continue\nto be submitted to the cluster, the cluster can be deleted, but further\ncluster update operations are not permitted.\n\nRecommendation: After receiving an `ERROR_DUE_TO_UPDATE` on a cluster,\n[recreate the cluster](/dataproc/docs/guides/recreate-cluster#recreate_and_update_a_cluster)\nby exporting the cluster configuration to create a new cluster, then delete the\nfailed cluster. If recreating the cluster fails, contact\n[Cloud Customer Care](/support) for help in restoring the cluster to a\n`RUNNING` state.\n| **Note:** A cluster can enter the `ERROR_DUE_TO_UPDATE` state if you attempt to update cluster resources through Compute Engine API operations. To update cluster resources, use [Dataproc update](/dataproc/docs/guides/manage-cluster#update_a_cluster) operations.\n\nDelete a cluster\n\nYou can delete a cluster via a Dataproc API\n[clusters.delete](/dataproc/docs/reference/rest/v1/projects.regions.clusters/delete) HTTP or programmatic request, using the Google Cloud CLI\n[gcloud](/sdk/gcloud/reference/dataproc/clusters/delete)\ncommand-line tool locally in a terminal window or in [Cloud Shell](https://console.cloud.google.com/?cloudshell=true), or from the [Google Cloud console](https://console.cloud.google.com/dataproc/clusters).\n**Deletion is permanent:** Once deleted, clusters cannot be restored. You can, however, quickly create new Dataproc clusters as you need them. \n\ngcloud command\n\nTo delete a Dataproc cluster, use the gcloud CLI\n[gcloud dataproc clusters delete](/sdk/gcloud/reference/dataproc/clusters/delete)\ncommand locally in a terminal window or in\n[Cloud Shell](https://console.cloud.google.com/?cloudshell=true). \n\n```\ngcloud dataproc clusters delete cluster-name \\\n --region=region\n```\n\nREST API\n\nUse the Dataproc\n[clusters.delete](/dataproc/docs/reference/rest/v1/projects.regions.clusters/delete)\nAPI to delete a cluster.\n\nConsole\n\nOpen the Dataproc\n[Clusters](https://console.cloud.google.com/dataproc/clusters)\npage in the Google Cloud console. Select the cluster by checking the box\nto the left of the cluster name, then Click **Delete** to\ndelete the cluster."]]