flyrain commented on code in PR #295: URL: https://github.com/apache/polaris/pull/295#discussion_r1801731763
########## getting-started/spark/README.md: ########## @@ -0,0 +1,51 @@ +<!-- + 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. +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 3 container services +* The `polaris` service for running Apache Polaris +* The `jupyter` service for running Jupyter notebook with PySpark +* The `create-polaris-catalog` service to run setup script and create local catalog in Polaris Review Comment: `local catalog` -> `a catalog backed by the local file system`? ########## getting-started/spark/README.md: ########## @@ -0,0 +1,51 @@ +<!-- + 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. +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 3 container services +* The `polaris` service for running Apache Polaris Review Comment: Nit: could we be more explicit that it starts with an in-memory metastore? ########## getting-started/spark/create-polaris-catalog.sh: ########## @@ -0,0 +1,56 @@ +# +# 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. +# + +SPARK_BEARER_TOKEN="${REGTEST_ROOT_BEARER_TOKEN:-principal:root;realm:default-realm}" +POLARIS_CATALOG_NAME="${POLARIS_CATALOG_NAME:-polaris_demo}" + +# create a catalog backed by the local filesystem Review Comment: I'm not entirely sure if we need this file. Could we handle everything directly within the notebook, like the other operations in `SparkPolaris.ipynb`? Would it simplify things if we moved the operations there? ########## getting-started/spark/README.md: ########## @@ -0,0 +1,51 @@ +<!-- + 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. Review Comment: There is other way to try Spark with Polaris without docker, it's a not a blocker, we can add it later. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
