Skip to content

Commit

Permalink
A short gradle command to run Polaris (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
flyrain authored Jan 26, 2025
1 parent db3b3b8 commit 5d0da21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
23 changes: 2 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ Apache Polaris is built using Gradle with Java 21+ and Docker 27+.
- `./gradlew build` - To build and run tests. Make sure Docker is running, as the integration tests depend on it.
- `./gradlew assemble` - To skip tests.
- `./gradlew test` - To run unit tests and integration tests.
- `./gradlew polarisServerRun` - To run the Polaris server locally; the server is reachable at
- `./gradlew run` - To run the Polaris server locally; the server is reachable at
localhost:8181. This is also suitable for running regression tests, or for connecting with Spark.
See below for more information on regression tests.

- `./regtests/run_spark_sql.sh` - To connect from Spark SQL. Here are some example commands to run in the Spark SQL shell:
```sql
create database db1;
Expand All @@ -73,7 +71,7 @@ create table db1.table1 (id int, name string);
insert into db1.table1 values (1, 'a');
select * from db1.table1;
```

- `env POLARIS_HOST=localhost ./regtests/run.sh` - To run regression tests locally, see more options [here](./regtests/README.md).
### More build and run options

#### Running in Docker
Expand All @@ -95,23 +93,6 @@ select * from db1.table1;
- `kubectl get deployment -n polaris` - To check the status of the deployment.
- `kubectl describe deployment polaris-deployment -n polaris` - To troubleshoot if things aren't working as expected.

#### Running regression tests

Regression tests can be run in a local environment or in a Docker environment.

To run regression tests locally, you first need to start Polaris, then run the tests:

```shell
./gradlew polarisServerRun
env POLARIS_HOST=localhost ./regtests/run.sh
```

To run regression tests in a Docker environment, you can use the following command:

```shell
docker compose -f regtests/docker-compose.yml up --build --exit-code-from regtest
```

#### Building docs

- Docs are generated using [Hugo](https://gohugo.io/) using the [Docsy](https://www.docsy.dev/docs/) theme.
Expand Down
2 changes: 1 addition & 1 deletion quarkus/server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tasks.named("distTar") { dependsOn("quarkusBuild") }

tasks.withType<Javadoc> { isFailOnError = false }

tasks.register("polarisServerRun") { dependsOn("quarkusRun") }
tasks.register("run") { dependsOn("quarkusRun") }

tasks.named<QuarkusRun>("quarkusRun") {
jvmArgs = listOf("-Dpolaris.bootstrap.credentials=POLARIS,root,secret")
Expand Down
2 changes: 1 addition & 1 deletion regtests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ In this setup, a Polaris server must be running on localhost:8181 before running
way to do this is to run the Polaris server in a separate terminal window:

```shell
./gradlew polarisServerRun
./gradlew run
```

Note: the regression tests expect Polaris to run with certain options, e.g. with support for `FILE`
Expand Down

0 comments on commit 5d0da21

Please sign in to comment.