Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Serverless pour Apache Spark vous permet d'exécuter des charges de travail Spark sans avoir à provisionner ni gérer votre propre cluster Dataproc.
Il existe deux façons d'exécuter des charges de travail Serverless pour Apache Spark :
Envoyez une charge de travail par lot au service Serverless pour Apache Spark à l'aide de la consoleGoogle Cloud , du Google Cloud CLI ou de l'API Dataproc. Le service exécute la charge de travail sur une infrastructure de calcul gérée en effectuant un autoscaling des ressources selon les besoins. Les frais Serverless pour Apache Spark ne s'appliquent qu'au moment où la charge de travail est exécutée.
Écrivez et exécutez du code dans des notebooks Jupyter lors d'une session interactive Serverless pour Apache Spark. Vous pouvez créer une session de notebook de différentes manières :
Utilisez le plug-in Dataproc JupyterLab pour créer plusieurs sessions de notebook Jupyter à partir de modèles que vous créez et gérez. Lorsque vous installez le plug-in sur une machine locale ou une VM Compute Engine, différentes fiches correspondant à différentes configurations du noyau Spark s'affichent sur la page du lanceur JupyterLab. Cliquez sur une fiche pour créer une session de notebook Serverless pour Apache Spark, puis commencez à écrire et à tester votre code dans le notebook.
Le plug-in Dataproc JupyterLab vous permet également d'utiliser la page de lancement JupyterLab pour effectuer les actions suivantes :
Créez des clusters Dataproc sur Compute Engine.
Envoyez des tâches à des clusters Dataproc sur Compute Engine.
Affichez les journaux Google Cloud et Spark.
Comparaison entre Serverless pour Apache Spark et Dataproc sur Compute Engine
Si vous souhaitez provisionner et gérer l'infrastructure, puis exécuter des charges de travail sur Spark et d'autres frameworks de traitement Open Source, utilisez Dataproc sur Compute Engine.
Le tableau suivant répertorie les principales différences entre Dataproc sur Compute Engine et Serverless pour Apache Spark.
Serverless pour Apache Spark respecte toutes les exigences de résidence des données, de CMEK, de VPC-SC et autres exigences de sécurité auxquelles Dataproc est conforme.
Fonctionnalités des charges de travail par lot
Vous pouvez exécuter les types de charges de travail par lot Serverless pour Apache Spark suivants :
PySpark
Spark SQL
Spark R
Spark (Java ou Scala)
Vous pouvez spécifier des propriétés Spark lorsque vous envoyez une charge de travail par lot Serverless pour Apache Spark.
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/02 (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/02 (UTC)."],[[["\u003cp\u003eDataproc Serverless allows the execution of Spark workloads without the need to provision and manage a Dataproc cluster, offering two methods: Spark Batch and Spark Interactive.\u003c/p\u003e\n"],["\u003cp\u003eDataproc Serverless for Spark Batch allows users to submit batch workloads via the Google Cloud console, CLI, or API, with the service managing resource scaling and only charging for active workload execution time.\u003c/p\u003e\n"],["\u003cp\u003eDataproc Serverless for Spark Interactive enables the writing and running of code within Jupyter notebooks, accessible through the Dataproc JupyterLab plugin, which also provides functionalities for creating and managing Dataproc on Compute Engine clusters.\u003c/p\u003e\n"],["\u003cp\u003eCompared to Dataproc on Compute Engine, Dataproc Serverless for Spark provides serverless capabilities, faster startup times, and interactive sessions, while Compute Engine offers greater infrastructure control and supports other open-source frameworks.\u003c/p\u003e\n"],["\u003cp\u003eDataproc Serverless adheres to data residency, CMEK, and VPC-SC security requirements and supports various Spark batch workload types including PySpark, Spark SQL, Spark R, and Spark (Java or Scala).\u003c/p\u003e\n"]]],[],null,["# Serverless for Apache Spark overview\n\n| **Dataproc Serverless** is now **Google Cloud Serverless for Apache Spark**. Until updated, some documents will refer to the previous name.\n\n\u003cbr /\u003e\n\nServerless for Apache Spark lets you run Spark workloads without requiring you\nto provision and manage your own Dataproc cluster.\nThere are two ways to run Serverless for Apache Spark workloads:\n\n- [Batch workloads](#spark-batch)\n- [Interactive sessions](#spark-interactive)\n\nBatch workloads\n---------------\n\nSubmit a batch workload to the Serverless for Apache Spark service using the\nGoogle Cloud console, Google Cloud CLI, or Dataproc API. The service\nruns the workload on a managed compute infrastructure, autoscaling resources\nas needed. [Serverless for Apache Spark charges](/dataproc-serverless/pricing) apply\nonly to the time when the workload is executing.\n\nTo get started, see\n[Run an Apache Spark batch workload](/dataproc-serverless/docs/quickstarts/spark-batch).\n| You can schedule a Spark batch workload as part of an [Airflow](https://airflow.apache.org/) or [Cloud Composer](/composer) workflow using an [Airflow batch operator](https://airflow.apache.org/docs/apache-airflow-providers-google/stable/operators/cloud/dataproc.html#create-a-batch). See [Run Serverless for Apache Spark workloads with Cloud Composer](/composer/docs/composer-2/run-dataproc-workloads) for more information.\n\nInteractive sessions\n--------------------\n\nWrite and run code in Jupyter notebooks during a Serverless for Apache Spark for\nSpark interactive session. You can create a notebook session in the following\nways:\n\n- [Run PySpark code in BigQuery Studio notebooks](/bigquery/docs/use-spark).\n Use the BigQuery Python notebook to create a\n [Spark-Connect-based](https://spark.apache.org/docs/latest/spark-connect-overview.html)\n Serverless for Apache Spark interactive session. Each BigQuery\n notebook can have only one active Serverless for Apache Spark session associated\n with it.\n\n- [Use the Dataproc JupyterLab plugin](/dataproc-serverless/docs/quickstarts/jupyterlab-sessions)\n to create multiple Jupyter notebook sessions from templates that you create\n and manage. When you install the plugin on a local machine or Compute Engine\n VM, different cards that correspond to different Spark kernel configurations\n appear on the JupyterLab launcher page. Click a card to create a Serverless for Apache Spark\n notebook session, then start writing and testing your code in the notebook.\n\n The Dataproc JupyterLab plugin also lets you\n use the JupyterLab launcher page to take the following actions:\n - Create Dataproc on Compute Engine clusters.\n - Submit jobs to Dataproc on Compute Engine clusters.\n - View Google Cloud and Spark logs.\n\nServerless for Apache Spark compared to Dataproc on Compute Engine\n------------------------------------------------------------------\n\nIf you want to provision and manage infrastructure, and then execute\nworkloads on Spark and other open source processing frameworks, use\n[Dataproc on Compute Engine](/dataproc/docs).\nThe following table lists key differences between the Dataproc on\nCompute Engine and Serverless for Apache Spark.\n\nSecurity compliance\n-------------------\n\nServerless for Apache Spark adheres to all [data residency](/terms/data-residency),\n[CMEK](/dataproc-serverless/docs/guides/cmek-serverless),\n[VPC-SC](/dataproc-serverless/docs/concepts/network#s8s-and-vpc-sc-networks),\nand other security requirements that Dataproc is compliant with.\n\nBatch workload capabilities\n---------------------------\n\nYou can run the following Serverless for Apache Spark batch workload types:\n\n- PySpark\n- Spark SQL\n- Spark R\n- Spark (Java or Scala)\n\nYou can specify [Spark properties](/dataproc-serverless/docs/concepts/properties)\nwhen you submit a Serverless for Apache Spark batch workload."]]