Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Dataproc-Cluster mit einer Vorlage erstellen
Auf dieser Seite wird beschrieben, wie Sie eine Inline-Vorlage von Google APIs Explorer verwenden, um die Dataproc API zum Erstellen eines Dataproc-Clusters aufzurufen.
Weitere Möglichkeiten zum Erstellen eines Clusters finden Sie unter:
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Um Dataproc-Jobs ausführen zu können, müssen Sie einen Cluster virtueller Maschinen erstellen, auf denen die Jobs ausgeführt werden. Zum Erstellen eines Dataproc-Clusters in Ihrem Projekt müssen Sie die Vorlage Google APIs Explorer testen ausfüllen und ausführen.
Geben Sie die Region an, in der sich Ihr Cluster befinden wird (akzeptieren oder ersetzen Sie „us-central1”). Da Sie in dieser Kurzanleitung keine Zone innerhalb der Region angeben, wählt die Automatische Zonenplatzierung in Dataproc eine Zone innerhalb der Region aus, in der sie den Cluster erstellt.
Anfragetext:
Geben Sie einen clusterName an (akzeptieren oder ersetzen Sie „example-cluster”).
Dieser Name dient zur Interaktion mit dem Cluster, z. B. wenn Sie Jobs senden oder den Cluster aktualisieren.
Klicken Sie auf AUSFÜHREN. Wenn Sie die API-Vorlage zum ersten Mal ausführen, werden Sie möglicherweise aufgefordert, ein Google-Konto auszuwählen und sich anzumelden, und autorisieren Sie dann Google APIs Explorer, auf Ihr Konto zuzugreifen. Wenn die Anfrage erfolgreich ist, zeigt die JSON-Antwort an, dass die Clustererstellung aussteht.
Öffnen Sie in der Google Cloud Console die Seite Dataproc-Cluster, um die Clustererstellung zu bestätigen. Nach Abschluss der Clusterbereitstellung wird der Status des Clusters als „Wird ausgeführt” angezeigt.
Bereinigen
Mit den folgenden Schritten vermeiden Sie, dass Ihrem Google Cloud -Konto die auf dieser Seite verwendeten Ressourcen in Rechnung gestellt werden:
Wenn Sie den Cluster nicht benötigen, um die anderen Kurzanleitungen auszuprobieren oder andere Jobs auszuführen, verwenden Sie den APIs Explorer, die Google Cloud -Konsole, das gcloud-Befehlszeilentool der gcloud CLI oder die Cloud-Clientbibliotheken, um den Cluster zu löschen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-22 (UTC)."],[[["\u003cp\u003eThis guide demonstrates how to create a Dataproc cluster using an inline Google APIs Explorer template to interact with the Dataproc API.\u003c/p\u003e\n"],["\u003cp\u003eBefore running Dataproc jobs, a cluster of virtual machines must be created using the provided Google APIs Explorer template, which requires your project ID and a specified region.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a cluster, users must input their project ID, choose a cluster region, and assign a cluster name, with options to accept or alter pre-filled values.\u003c/p\u003e\n"],["\u003cp\u003eAfter cluster creation, you can verify its status as "Running" on the Dataproc Clusters page in the Google Cloud console, and if no longer needed, the cluster should be deleted to avoid charges.\u003c/p\u003e\n"],["\u003cp\u003eAlternative ways to create a cluster exist, such as using the Google Cloud console, the Google Cloud CLI, or client libraries, and these are also options for removing the cluster.\u003c/p\u003e\n"]]],[],null,["# Quickstart: Create a Dataproc cluster by using a template\n\nCreate a Dataproc cluster by using a template\n=============================================\n\nThis page shows you how to use an inline\n[Google APIs Explorer](https://developers.google.com/apis-explorer/#p/)\ntemplate to call the Dataproc API to create a Dataproc cluster.\n\nFor other ways to create a cluster, see:\n\n- [Create a Dataproc cluster by using the Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#create_a_cluster)\n- [Create a Dataproc cluster by using the Google Cloud CLI](/dataproc/docs/quickstarts/create-cluster-gcloud#create_a_cluster)\n- [Create a Dataproc cluster by using client libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries)\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n\u003cbr /\u003e\n\nCreate a cluster\n----------------\n\nBefore you can run Dataproc jobs, you need to create a cluster\nof virtual machines to run them on. To create a Dataproc cluster\nin your project, fill in and execute the Google APIs Explorer **Try this API**\ntemplate.\n| **Note:** The `region` and `clusterName` parameter values are filled in for you. Accept or replace these \"seeded\" parameter values.\n\n1. **Request parameters:**\n\n 1. Insert your [**projectId**](https://console.cloud.google.com/).\n 2. Specify the [**region**](/compute/docs/regions-zones/regions-zones#available) where your cluster will be located (accept or replace \"us-central1\"). Since you are not specifying a zone within the region in this quickstart, [Dataproc Auto Zone placement](/dataproc/docs/concepts/configuring-clusters/auto-zone) will pick a zone within the region where it will create the cluster.\n2. **Request body:**\n\n 1. Specify a [**clusterName**](/dataproc/docs/reference/rest/v1/projects.regions.clusters#Cluster.FIELDS.cluster_name), (accept or replace \"example-cluster\"). You will use this name to interact with your cluster, for example when you [submit jobs](/dataproc/docs/quickstarts/submit-spark-job-template) or [update the cluster](/dataproc/docs/quickstarts/update-cluster-template).\n3. Click **EXECUTE**. The first time you\n run the API template, you may be asked to choose and sign into\n your Google account, then authorize the Google APIs Explorer to access your\n account. If the request is successful, the JSON response\n shows that cluster creation is pending.\n\n4. To confirm cluster creation, open the\n [Dataproc Clusters](https://console.cloud.google.com/dataproc/clusters)\n page in the Google Cloud console. After cluster provisioning completes,\n the cluster's status will show as \"Running\".\n\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n\u003cbr /\u003e\n\n1. If you don't need the cluster to explore the other quickstarts or to run other jobs, use the [APIs Explorer](/dataproc/docs/quickstarts/quickstart-explorer-delete), the [Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#clean-up), the gcloud CLI [gcloud](/dataproc/docs/quickstarts/create-cluster-gcloud#clean-up) command-line tool, or the [Cloud Client Libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries) to delete the cluster.\n\nWhat's next\n-----------\n\n- Learn how to [submit a Spark job by using a template](/dataproc/docs/quickstarts/submit-spark-job-template)."]]