commit | f7ad5188552c4f0c78c2dc1ad6f24c1977583d5c | [log] [tgz] |
---|---|---|
author | Matthew Powers <matthewkevinpowers@gmail.com> | Thu Apr 11 09:05:36 2024 +0900 |
committer | Hyukjin Kwon <gurwls223@apache.org> | Thu Apr 11 09:05:36 2024 +0900 |
tree | 1290f5199280e8f002dc7f2c4715f784d705c36e | |
parent | 3007733a4f6e18a6e67c6302bee5941d7f888414 [diff] |
[MINOR] Make readme easier to follow ### What changes were proposed in this pull request? Update the README to make it easier to follow. ### Why are the changes needed? I tried to get spark-connect-go running locally and it was a little confusing. This new layout should make the setup steps a lot clearer. ### Does this PR introduce _any_ user-facing change? Just updates the README. ### How was this patch tested? N/A. Closes #18 from MrPowers/update-readme. Authored-by: Matthew Powers <matthewkevinpowers@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
This project houses the experimental client for Spark Connect for Apache Spark written in Golang.
Currently, the Spark Connect client for Golang is highly experimental and should not be used in any production setting. In addition, the PMC of the Apache Spark project reserves the right to withdraw and abandon the development of this project if it is not sustainable.
This section explains how to run Spark Connect Go locally.
Step 1: Install Golang: https://go.dev/doc/install.
Step 2: Ensure you have installed buf CLI
installed, more info here
Step 3: Run the following commands to setup the Spark Connect client.
git clone https://github.com/apache/spark-connect-go.git git submodule update --init --recursive make gen && make test
Step 4: Setup the Spark Driver on localhost.
Download Spark distribution (3.4.0+), unzip the package.
Start the Spark Connect server with the following command (make sure to use a package version that matches your Spark distribution):
sbin/start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:3.4.0
Step 5: Run the example Go application.
go run cmd/spark-connect-example-spark-session/main.go
Following diagram shows main code in current prototype:
+-------------------+ | | | dataFrameImpl | | | +-------------------+ | | + +-------------------+ | | | sparkSessionImpl | | | +-------------------+ | | + +---------------------------+ +----------------+ | | | | | SparkConnectServiceClient |--------------+| Spark Driver | | | | | +---------------------------+ +----------------+
SparkConnectServiceClient
is GRPC client which talks to Spark Driver. sparkSessionImpl
generates dataFrameImpl
instances. dataFrameImpl
uses the GRPC client in sparkSessionImpl
to communicate with Spark Driver.
We will mimic the logic in Spark Connect Scala implementation, and adopt Go common practices, e.g. returning error
object for error handling.
Please review the Contribution to Spark guide for information on how to get started contributing to the project.