Vai al contenuto principale

Configure Cloud Object Storage (GCS, S3, Azure) for Data Lake

Ilum allows you to link GCS, S3, WASBSe HDFS storages to your clusters. Linking storage allows Ilum to automatically configure all your jobs to use your cloud data lakes seamlessly, eliminating the need for manual Spark parameter configuration.

Supported Storage Providers

ProviderDigitareDescrizione
Archiviazione cloud di GoogleGCSNative integration for GCP projects.
Amazon S3S3Standard S3 and S3-compatible storage support.
Archiviazione BLOB di AzureWASBS/ABFSIntegration for Azure data lakes.
HDFSHDFSConnect to existing Hadoop Distributed File Systems.

Google Cloud Storage (GCS)

Step 1: Create a GCS Bucket

Demo:

Guida a schermo intero

  1. Create a Google Cloud Project

    • Open Google Cloud Console e vai su Selettore di progetti / Manage Resources.
    • Clic New Project / Create Project.
    • Enter a Project name, choose Organization e Ubicazione.
  2. Create a GCS Bucket

    • In the Console, navigate to Archiviazione cloudBuckets.
    • Clic Creare.
    • Enter a globally unique Bucket name (e.g., my-ilum-bucket) and select your Region.
    nota

    Remember the bucket name you created - you will need it when adding this storage to Ilum.

  3. Create a Service Account and JSON Key

    • Vai a IAM & AdminService Accounts.
    • Clic Create Service Account, fill in details, and grant Storage Admin roles.
    • Click the created email, go to the Keys tab, and Create new key (JSON).
    • Save the downloaded JSON file securely.
    important

    Organization Policy Update: In new organizations, creating service account keys might be disabled by default. Contact your administrator if you cannot create keys.

Step 2: Add GCS to Ilum Cluster

Demo:

Guida a schermo intero

  1. Navigate to CarichiAmmassiRedigereImmagazzinamentoAdd Storage.

  2. Configure General Settings:

ParameterValue ExampleDescrizione
Nomemy-gcs-storageUnique name for this storage config.
DigitareGCSSelect GCS provider.
Benna scintillamy-ilum-bucketBucket for Spark logs/events.
Bucket di datimy-ilum-bucketBucket for your data.
  1. Configure GCS Authorization: Open your JSON key file and copy the values:
ParameterSource KeyDescrizione
Client Emailclient_emailService account email address.
Private Keyprivate_keyFull key including -----BEGIN....
Private Key IDprivate_key_idKey ID string.
  1. Clic Invia to save.

Step 3: Verify Connection

To ensure your storage is correctly configured, run a simple Spark job.

  1. Create a Code Service:

    • Vai a CarichiServiziNew Service +.
    • Select Digitare: Codice, Lingua: Scala, and your Grappolo.
  2. Execute Test Code: Paste and run the following Scala code:

    Test Storage Connection
    // Write test data
    val dati = Seq(("Alice", 34), ("Bob", 45))
    val Df = scintilla.createDataFrame(dati).toDF("nome", "age")

    // Replace with your bucket path (e.g., gs://..., s3a://..., wasbs://...)
    val sentiero = "gs://my-ilum-bucket/output/"

    Df.scrivere.modo("sovrascrivere").format("csv").save(sentiero)

    // Read back data
    scintilla.leggere.format("csv").load(sentiero).mostrare()
  3. Check Results: If the job completes and displays the data table, your storage connection is active.


Common Issues & FAQ

Why do I get a "Permission Denied" error?

Causa: The Service Account or User doesn't have permissions to access the bucket. Soluzione:

  1. Go to your cloud provider's console (e.g., Google Cloud Console).
  2. Navigate to the bucket's Autorizzazioni scheda.
  3. Grant your service account the Storage Admin o Storage Object Admin role.

Why does it say "Bucket does not exist"?

Causa: The bucket name in your code doesn't match the actual bucket name, or the region is incorrect. Soluzione:

  1. Verify the bucket exists in your cloud console.
  2. Check that the bucket name in your code matches exactly (names are often case-sensitive).

Why do I get "Invalid credentials"?

Causa: The keys (JSON or Access Keys) were not copied correctly. Soluzione:

  1. Re-open your key file.
  2. Carefully copy the values again. For GCS, ensure you include the -----INIZIA LA CHIAVE PRIVATA----- e -----TERMINA LA CHIAVE PRIVATA----- lines.
  3. Re-save the storage configuration in Ilum.