Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment mettre à jour et supprimer un cluster Dataproc existant.
Mettre à jour un cluster
Vous pouvez mettre à jour un cluster en envoyant une requête clusters.patch de l'API Dataproc, en exécutant une commande gcloud dataproc clusters update dans une fenêtre de terminal locale ou dans Cloud Shell, ou en modifiant les paramètres du cluster dans l'onglet "Configuration" de la page "Informations sur le cluster" du cluster dans la consoleGoogle Cloud .
Les paramètres de cluster suivants peuvent être mis à jour :
Dataproc génère une erreur ERROR_DUE_TO_UPDATE lorsqu'une opération de mise à jour d'un cluster échoue. Cette erreur place le cluster dans un état de sécurité pour éviter la perte de données et limite les opérations de cluster supplémentaires : les jobs peuvent continuer à être envoyés au cluster, et le cluster peut être supprimé, mais les opérations de mise à jour du cluster supplémentaires ne sont pas autorisées.
Recommandation : Après avoir reçu un ERROR_DUE_TO_UPDATE sur un cluster, recréez-le en exportant sa configuration pour en créer un autre, puis supprimez le cluster défaillant. Si la recréation du cluster échoue, contactez Cloud Customer Care pour obtenir de l'aide afin de restaurer le cluster dans un état RUNNING.
Supprimer un cluster
Vous pouvez supprimer un cluster via une requête HTTP ou une requête automatisée clusters.delete de l'API Dataproc, à l'aide de l'outil de ligne de commande gcloud de la Google Cloud CLI (en local dans une fenêtre de terminal ou dans Cloud Shell), ou encore à partir de la consoleGoogle Cloud .
Utilisez l'API Dataproc clusters.delete pour supprimer un cluster.
Console
Ouvrez la page Dataproc Clusters dans la console Google Cloud . Sélectionnez le cluster en cochant la case située à gauche de son nom, puis cliquez sur Delete (Supprimer) pour le supprimer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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."]]