Monitorare e risolvere i problemi relativi alle sessioni interattive
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questo documento descrive come monitorare e risolvere i problemi relativi alle sessioni interattive di Serverless per Apache Spark utilizzando la UI di Spark.
UI Spark
La UI di Spark raccoglie i dettagli di esecuzione di Apache Spark dalle sessioni interattive di Serverless per Apache Spark. Non è previsto alcun costo per la funzionalità UI di Spark,
che è abilitata per impostazione predefinita. I dati raccolti dalla funzionalità UI di Spark vengono conservati
per 90 giorni.
Ruoli e autorizzazioni Identity and Access Management richiesti
Per utilizzare la funzionalità UI di Spark con le sessioni interattive sono necessarie le seguenti autorizzazioni:
Autorizzazione per la raccolta dei dati: dataproc.sessions.sparkApplicationWrite. Questa
autorizzazione deve essere concessa alaccount di serviziot che esegue le sessioni interattive.
È incluso nel ruolo
Dataproc Worker, che viene concesso automaticamente alaccount di serviziot Compute Engine predefinito
utilizzato per impostazione predefinita da Serverless per Apache Spark. Tuttavia, se specifichi un
service account personalizzato
per la tua sessione
o il tuo modello di runtime della sessione,
devi aggiungere questa autorizzazione dataproc.sessions.sparkApplicationWrite a questo account di servizio
(in genere, concedendo al account di servizio il ruolo Dataproc Worker).
Autorizzazione di accesso alla UI Spark: dataproc.sessions.sparkApplicationRead. Questa
autorizzazione deve essere concessa a un utente per accedere alla UI di Spark nella
consoleGoogle Cloud . È incluso nei ruoli
Dataproc Viewer, Dataproc Editor e Dataproc Administrator. Per aprire la UI di Spark nella console Google Cloud , devi disporre di uno di questi ruoli o di un ruolo personalizzato che includa questa autorizzazione.
Apri la UI Spark
La pagina dell'interfaccia utente di Spark è disponibile nella console Google Cloud .
Fai clic su un ID sessione interattiva per aprire la pagina Dettagli sessione interattiva.
Fai clic su Visualizza UI Spark nel menu in alto.
Il link Visualizza UI Spark è disattivato? Se un'autorizzazione richiesta non viene concessa o se deselezioni la casella di controllo Attiva UI di Spark nella pagina dei dettagli della sessione interattiva o imposti la proprietà spark.dataproc.appContext.enabled su false (valore predefinito: true) quando crei una sessione o crei un modello di runtime della sessione, il pulsante Visualizza UI di Spark verrà disattivato.
[[["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\u003eThe Spark UI is a free feature that collects and displays Apache Spark execution details from Dataproc Serverless interactive sessions, retaining data for 90 days, and is enabled by default.\u003c/p\u003e\n"],["\u003cp\u003eTo use the Spark UI with interactive sessions, the service account running the session needs the \u003ccode\u003edataproc.sessions.sparkApplicationWrite\u003c/code\u003e permission, and users accessing the UI need the \u003ccode\u003edataproc.sessions.sparkApplicationRead\u003c/code\u003e permission.\u003c/p\u003e\n"],["\u003cp\u003eYou can access the Spark UI by navigating to the Dataproc Interactive Sessions in the Google Cloud console, selecting an interactive session, and clicking "View Spark UI" in the top menu.\u003c/p\u003e\n"],["\u003cp\u003eThe "View Spark UI" button will be disabled if the necessary permissions are missing or if the Spark UI feature has been disabled during session creation by unchecking the "Enable Spark UI" checkbox or setting the \u003ccode\u003espark.dataproc.appContext.enabled\u003c/code\u003e property to false.\u003c/p\u003e\n"]]],[],null,["# Monitor and troubleshoot interactive sessions\n\nThis document describes how to monitor and troubleshoot Serverless for Apache Spark [interactive sessions](/dataproc-serverless/docs/quickstarts/jupyterlab-sessions) using the Spark UI.\n\n\u003cbr /\u003e\n\nSpark UI\n--------\n\nThe Spark UI collects Apache Spark execution details from Serverless for Apache Spark\ninteractive sessions. There is no charge for the Spark UI feature,\nwhich is enabled by default. Data collected by the Spark UI feature is retained\nfor 90 days.\n| **Note:** The Spark UI also collects and displays execution details from Serverless for Apache Spark batch workloads. See [Monitor and troubleshoot batch workloads](/dataproc-serverless/docs/guides/monitor-troubleshoot-batches) for more information.\n\n### Required Identity and Access Management permissions and roles\n\nThe following permissions are required to use the Spark UI feature with interactive\nsessions:\n\n- Data collection permission: `dataproc.sessions.sparkApplicationWrite`. This\n permission must be granted to the service account that runs interactive sessions.\n It is included in the\n [`Dataproc Worker`](/iam/docs/understanding-roles#dataproc.worker)\n role, which is automatically granted to the Compute Engine default service account\n that Serverless for Apache Spark uses by default. However, if you specify a\n [custom service account](/dataproc-serverless/docs/concepts/service-account)\n for your [session](/sdk/gcloud/reference/beta/dataproc/sessions/create#--service-account)\n or [session runtime template](/dataproc-serverless/docs/quickstarts/jupyterlab-sessions#dataproc_create_serverless_runtime_template_yaml-Complex%20YAML),\n you must add this `dataproc.sessions.sparkApplicationWrite` permission to that service account\n (typically, by granting the service account the Dataproc `Worker` role).\n\n- Spark UI access permission: `dataproc.sessions.sparkApplicationRead`. This\n permission must be granted to a user to access the Spark UI in the\n Google Cloud console. It is included in the\n [`Dataproc Viewer`, `Dataproc Editor` and `Dataproc Administrator`](/dataproc-serverless/docs/concepts/iam#roles)\n roles. To open the Spark UI in the Google Cloud console, you must have one of\n these roles or have a custom role that includes this permission.\n\n### Open the Spark UI\n\nThe Spark UI page is available in the Google Cloud console.\n\n1. [Go to Dataproc Interactive Sessions](https://console.cloud.google.com/dataproc/interactive)\n\n2. Click an **Interactive Session ID** to open the **Interactive Session Details** page.\n3. Click **View Spark UI** in the top menu.\n\n**Is the *View Spark UI* link disabled?** If a\n[required permission is not granted](#required-iam-permissions-and-roles),\nor if you clear the **Enable Spark UI** checkbox on the interactive session details page or set\nthe `spark.dataproc.appContext.enabled` property to `false` (default: `true`) when you\n[create a session](/sdk/gcloud/reference/beta/dataproc/sessions/create/spark#--property) or\n[create a session runtime template](/dataproc-serverless/docs/quickstarts/jupyterlab-sessions#create_a_serverless_runtime_template),\nthe **View Spark UI** button will be disabled."]]