Skip to content

Commit 5ea964b

Browse files
authored
Enhance EclipseLink quickstart (#1870)
1. Update the name catalog name used to `quickstart_catalog` from `polaris` to make it consistent 2. Update the name of `eclipselink-trino-1` to `polaris-trino-1` 3. make the polaris server url consistent with using `localhost` to avoid failures
1 parent 8942f68 commit 5ea964b

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

getting-started/eclipselink/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ This example requires `jq` to be installed on your machine.
5454
You may not see Spark's prompt immediately, type ENTER to see it. A few commands that you can try:
5555
5656
```sql
57-
CREATE NAMESPACE polaris.ns1;
58-
USE polaris.ns1;
57+
CREATE NAMESPACE quickstart_catalog.ns1;
58+
USE quickstart_catalog.ns1;
5959
CREATE TABLE table1 (id int, name string);
6060
INSERT INTO table1 VALUES (1, 'a');
6161
SELECT * FROM table1;
@@ -64,8 +64,7 @@ This example requires `jq` to be installed on your machine.
6464
4. To access Polaris from the host machine, first request an access token:
6565
6666
```shell
67-
export POLARIS_TOKEN=$(curl -s http://polaris:8181/api/catalog/v1/oauth/tokens \
68-
--resolve polaris:8181:127.0.0.1 \
67+
export POLARIS_TOKEN=$(curl -s http://localhost:8181/api/catalog/v1/oauth/tokens \
6968
--user root:s3cr3t \
7069
-d 'grant_type=client_credentials' \
7170
-d 'scope=PRINCIPAL_ROLE:ALL' | jq -r .access_token)
@@ -74,15 +73,15 @@ This example requires `jq` to be installed on your machine.
7473
5. Then, use the access token in the Authorization header when accessing Polaris:
7574
7675
```shell
77-
curl -v http://127.0.0.1:8181/api/management/v1/principal-roles -H "Authorization: Bearer $POLARIS_TOKEN"
78-
curl -v http://127.0.0.1:8181/api/management/v1/catalogs/quickstart_catalog -H "Authorization: Bearer $POLARIS_TOKEN"
76+
curl -v http://localhost:8181/api/management/v1/principal-roles -H "Authorization: Bearer $POLARIS_TOKEN"
77+
curl -v http://localhost:8181/api/management/v1/catalogs/quickstart_catalog -H "Authorization: Bearer $POLARIS_TOKEN"
7978
```
8079
8180
6. Using Trino CLI: To access the Trino CLI, run this command:
8281
```
83-
docker exec -it eclipselink-trino-1 trino
82+
docker exec -it polaris-trino-1 trino
8483
```
85-
Note, `trino-trino-1` is the name of the Docker container.
84+
Note, `polaris-trino-1` is the name of the Docker container. The actual name on your system may vary.
8685
8786
Example Trino queries:
8887
```

getting-started/eclipselink/docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ services:
8585
--conf, "spark.sql.catalog.quickstart_catalog.type=rest",
8686
--conf, "spark.sql.catalog.quickstart_catalog.warehouse=quickstart_catalog",
8787
--conf, "spark.sql.catalog.quickstart_catalog.uri=http://polaris:8181/api/catalog",
88-
--conf, "spark.sql.catalog.quickstart_catalog.credential=${USER_CLIENT_ID}:${USER_CLIENT_SECRET}",
88+
--conf, "spark.sql.catalog.quickstart_catalog.credential=${CLIENT_ID}:${CLIENT_SECRET}",
8989
--conf, "spark.sql.catalog.quickstart_catalog.scope=PRINCIPAL_ROLE:ALL",
9090
--conf, "spark.sql.defaultCatalog=quickstart_catalog",
9191
--conf, "spark.sql.catalogImplementation=in-memory",
@@ -98,8 +98,8 @@ services:
9898
polaris-setup:
9999
condition: service_completed_successfully
100100
environment:
101-
- CLIENT_ID=${USER_CLIENT_ID}
102-
- CLIENT_SECRET=${USER_CLIENT_SECRET}
101+
- CLIENT_ID=${CLIENT_ID}
102+
- CLIENT_SECRET=${CLIENT_SECRET}
103103
stdin_open: true
104104
tty: true
105105
ports:

0 commit comments

Comments
 (0)