💊Google Cloud Dataproc
Summary
DataFlint reads Spark event logs and cluster and job metadata from your Google Cloud Dataproc project through a service account that you create. The service account is read-only: DataFlint cannot create, change or delete clusters or jobs.
You will:
Create a dedicated service account.
Grant it Dataproc Viewer on the project and Storage Object Viewer on the buckets that hold Spark event logs and driver output.
Create a JSON key.
Add the project in the DataFlint console.
The entire process should take a few minutes.
How it works
Dataproc writes Spark event logs to Cloud Storage. By default this is the cluster's temp bucket, under <cluster-uuid>/spark-job-history/; clusters that set spark:spark.eventLog.dir write to the bucket you configured. Dataproc writes each job's driver output to the cluster's staging bucket. DataFlint discovers the exact locations from each cluster's configuration, so you do not need to send bucket names.
Required IAM permissions (minimal)
Grant the DataFlint service account:
Project-level:
roles/dataproc.viewer— lists clusters and reads cluster and job metadata.Bucket-level:
roles/storage.objectVieweronevery bucket your clusters write Spark event logs to (the Dataproc temp bucket by default, or the bucket in
spark:spark.eventLog.dirif you set one);the cluster staging bucket (or the output bucket you configured for the cluster), where Dataproc writes job driver output. DataFlint reads it to explain failed runs.
Both grants are read-only.
Installation
Pick one method. All methods create the same resources.
Step 1: Create a service account
Open IAM & Admin → Service Accounts.
Click Create service account.
Use:
Name:
dataflint-events-readerDescription:
Read-only access to Dataproc Spark event logs
Click Done.
Step 2: Create a service account key (JSON)
Open the service account.
Go to Keys.
Click Add key → Create new key.
Select JSON.
Download and store the file securely.
Step 3: Grant Dataproc Viewer
Open IAM & Admin → IAM.
Click Grant access.
Principal:
dataflint-events-reader@<PROJECT_ID>.iam.gserviceaccount.comRole: Dataproc Viewer (
roles/dataproc.viewer)
Step 4: Grant bucket read access
Repeat for the temp bucket (or your custom event-log bucket) and for the staging bucket:
Open Cloud Storage → Buckets and open the bucket.
The temp bucket usually looks like
dataproc-temp-<region>-<project-number>-...; the staging bucket likedataproc-staging-<region>-<project-number>-....
Open Permissions.
Click Grant access.
Add the same principal as above.
Role: Storage Object Viewer (
roles/storage.objectViewer)
Add it in DataFlint
In the DataFlint console go to Admin Panel → Environment Management → Add New → Dataproc and fill in:
Environment name
Engine type — Compute Engine
Region — one region per environment. Add another environment for each additional region.
GCP project ID
Cluster ID (optional) — restrict ingestion to one cluster
Service account key — paste the JSON key file contents
Click Add Environment. The environment shows as Pending approval while DataFlint verifies access; ingestion starts once it is approved.
Rotating the key
Create a new key for the service account, edit the environment in the console, paste the new key, and then delete the old key in Google Cloud.
Validate the access (recommended)
Use the key to test that listing clusters and reading objects works.
Last updated