Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

New Container: Spark Connect

Aperta
#825 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
docker, python, spark

Direzione di ricerca

Inizia individuando le integrazioni dei container esistenti e l’API DockerContainer utilizzata nell’esempio. Esamina l’immagine apache/spark, l’entrypoint di Spark Connect, la porta 8081 e l’utilizzo di wait_for_logs. Il lavoro è completato quando è possibile avviare un container Spark Connect con la configurazione richiesta e rilevarne in modo affidabile l’avvio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

🚀 enhancement

What is the new container you'd like to have?

Spark connect introduces a decoupled client-server architecture to allow remote connectivity to spark server, official documentation is here.

It's used by data engineers to distribute data transformation jobs into multiple clusters. Spark connect is an addition to spark with leverages the jvm.

Benefits of having this in container would enable data engineers:

  • to be able to tests their workflows without having to go through a cloud provider like Databricks
  • prevent the manual setup of jvm which can be quite cumbersome

The most commonly used docker image is apache/spark.

Why not just use a generic container for this?

The implementation of the spark connect server with DockerContainer would expose extra configurations. On corporate projects, the following implementation is required

    kwargs = {
        "entrypoint": "/opt/spark/sbin/start-connect-server.sh org.apache.spark.deploy.master.Master --packages org.apache.spark:spark-connect_2.12:3.5.2,io.delta:delta-core_2.12:2.3.0 --conf spark.driver.extraJavaOptions='-Divy.cache.dir=/tmp -Divy.home=/tmp' --conf spark.connect.grpc.binding.port=8081",
    }
with (
        DockerContainer(
            "apache/spark",
        )
        .with_bind_ports(8081, 8081)
        .with_env("SPARK_NO_DAEMONIZE", "True")
        .with_volume_mapping(pytest_tmp_dir, pytest_tmp_dir, "rw")
        .with_kwargs(**kwargs) as container
    ):
        _ = wait_for_logs(container, "SparkConnectServer: Spark Connect server started at")
        yield container

The added complexity is due to configuration of the entrypoint, one would need to have expertise in spark connect to launch the server and ensure the proper port exports. There is a compatibility versions to guarantee between spark and the delta-core jar package.

Other references:

Some resources here

Lingua principale
Python
Stelle
2.3k
Fork
386
Merge medio
4h 40m
PR unite (30g)
1

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-python

Tutte le issue di testcontainers/testcontainers-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.