-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spark Jupyter getting started docker compose #295
Changes from all commits
89c8164
35b8820
af516b9
143ee1d
c94c654
8acb1b5
ccafb2d
be13e1e
bec6dff
aa69a5d
7c5f659
da0cc16
d44b948
797fabb
c2c3437
708522a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit conflicted about this doc. It feels like it doesn't really teach the reader anything about Polaris, although it does give you a really fast way to get bootstrapped. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes I'll admit, this README is a filler for now as a way to get spark & polaris up and running quickly |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
# Getting Started with Apache Spark and Apache Polaris | ||
|
||
This getting started guide provides a `docker-compose` file to set up [Apache Spark](https://spark.apache.org/) with Apache Polaris. Apache Polaris is configured as an Iceberg REST Catalog in Spark. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is other way to try Spark with Polaris without docker, it's a not a blocker, we can add it later. |
||
A Jupyter notebook is used to run PySpark. | ||
|
||
## Run the `docker-compose` file | ||
To start the `docker-compose` file, run this command from the repo's root directory: | ||
``` | ||
docker-compose -f getting-started/spark/docker-compose.yml up | ||
``` | ||
|
||
This will spin up 2 container services | ||
* The `polaris` service for running Apache Polaris using an in-memory metastore | ||
* The `jupyter` service for running Jupyter notebook with PySpark | ||
|
||
## Access the Jupyter notebook interface | ||
In the Jupyter notebook container log, look for the URL to access the Jupyter notebook. The url should be in the format, `http://127.0.0.1:8888/lab?token=<token>`. | ||
|
||
Open the Jupyter notebook in a browser. | ||
Navigate to [`notebooks/SparkPolaris.ipynb`](http://127.0.0.1:8888/lab/tree/notebooks/SparkPolaris.ipynb) <!-- markdown-link-check-disable-line --> | ||
|
||
## Change the Polaris credential | ||
The Polaris service will create a new root crendential on startup, find this credential in the Polaris service log and change the `polaris_credential` variable in the first cell of the jupyter notebook | ||
|
||
## Run the Jupyter notebook | ||
You can now run all cells in the notebook or write your own code! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR moved
notebooks/
from top-level directory into thegetting-started/
directory