Skip to content

Commit 540c4e2

Browse files
committed
feat: catalog initialization & http example requests
1 parent 247416a commit 540c4e2

15 files changed

Lines changed: 911 additions & 18 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"dev": {
3+
"host": "localhost",
4+
"port": "9090",
5+
"baseUrl": "http://localhost:9090",
6+
"token": "dev",
7+
"catalogIdIcebergInternal": "dev-iceberg-internal",
8+
"catalogIdIcebergProxy": "dev-iceberg-proxy",
9+
"catalogIdPaimonInternal": "dev-paimon-internal",
10+
"catalogIdPaimonProxy": "dev-paimon-proxy",
11+
"catalogIdLanceProxy": "dev-lance-proxy",
12+
"namespace": "demo",
13+
"database": "demo",
14+
"table": "events",
15+
"s3Endpoint": "http://localhost:9000",
16+
"jdbcUri": "jdbc:postgresql://localhost:5432/postgres"
17+
}
18+
}
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# ICEBERG INTERNAL — Kasanari JDBC catalog manual test pipeline
2+
3+
## Prerequisites
4+
5+
1. `docker compose -f development/docker-compose.yml up -d`
6+
2. Start Quarkus with dev profile (port 9090, `application-dev.properties`)
7+
3. Run requests top-to-bottom (use the IDE run gutter on each `shell` block)
8+
9+
Variables below match [`http-client.env.json`](http-client.env.json) `dev` profile. Use a fresh catalog id if re-running section 1.
10+
11+
## 1.1 Register catalog (management)
12+
13+
```shell
14+
POST http://localhost:9090/management/v1/catalogs
15+
Authorization: Bearer dev
16+
Content-Type: application/json
17+
18+
{
19+
"catalogId": "dev-iceberg-internal",
20+
"catalogType": "ICEBERG",
21+
"mode": "INTERNAL",
22+
"spec": {
23+
"fileIoProperties": {},
24+
"catalogProperties": {
25+
"kasanari.jdbc.user": "postgres",
26+
"kasanari.jdbc.password": "postgres",
27+
"uri": "jdbc:postgresql://localhost:5432/postgres",
28+
"warehouse": "s3a://warehouse",
29+
"io-impl": "org.apache.iceberg.aws.s3.S3FileIO",
30+
"s3.endpoint": "http://localhost:9000",
31+
"s3.access-key-id": "admin",
32+
"s3.secret-access-key": "password",
33+
"s3.path-style-access": "true",
34+
"s3.client-factory": "kasanari.fixtures.s3.NoneRegionS3FileIOAwsClientFactory"
35+
}
36+
}
37+
}
38+
```
39+
40+
## 1.2 Get catalog metadata (management)
41+
42+
```shell
43+
GET http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-internal
44+
Authorization: Bearer dev
45+
```
46+
47+
## 2. Get catalog config (iceberg)
48+
49+
```shell
50+
GET http://localhost:9090/iceberg/v1/config?warehouse=dev-iceberg-internal
51+
Authorization: Bearer dev
52+
```
53+
54+
## 3.1 List namespaces
55+
56+
```shell
57+
GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces
58+
Authorization: Bearer dev
59+
```
60+
61+
## 3.2 Create namespace
62+
63+
```shell
64+
POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces
65+
Authorization: Bearer dev
66+
Content-Type: application/json
67+
68+
{
69+
"namespace": ["demo"],
70+
"properties": {}
71+
}
72+
```
73+
74+
## 3.3 List tables in namespace
75+
76+
```shell
77+
GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables
78+
Authorization: Bearer dev
79+
```
80+
81+
## 3.4 List views in namespace
82+
83+
```shell
84+
GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/views
85+
Authorization: Bearer dev
86+
```
87+
88+
## 4.1 Create table
89+
90+
```shell
91+
POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables
92+
Authorization: Bearer dev
93+
Content-Type: application/json
94+
95+
{
96+
"name": "events",
97+
"location": "s3a://warehouse/demo/events",
98+
"schema": {
99+
"type": "struct",
100+
"fields": [
101+
{
102+
"id": 1,
103+
"name": "id",
104+
"type": "long",
105+
"required": true
106+
}
107+
]
108+
},
109+
"partition-spec": {
110+
"spec-id": 0,
111+
"fields": []
112+
},
113+
"write-order": {
114+
"order-id": 0,
115+
"fields": []
116+
},
117+
"properties": {
118+
"custom-property": "value"
119+
}
120+
}
121+
```
122+
123+
## 4.2 Get table (copy metadata.table-uuid for alter)
124+
125+
```shell
126+
GET http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events
127+
Authorization: Bearer dev
128+
```
129+
130+
## 4.3 Alter table (replace TABLE_UUID from 4.2 response)
131+
132+
```shell
133+
POST http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events
134+
Authorization: Bearer dev
135+
Content-Type: application/json
136+
137+
{
138+
"requirements": [
139+
{
140+
"type": "assert-table-uuid",
141+
"uuid": "TABLE_UUID"
142+
}
143+
],
144+
"updates": [
145+
{
146+
"action": "set-properties",
147+
"updates": {
148+
"custom-property": "updated-value"
149+
}
150+
}
151+
]
152+
}
153+
```
154+
155+
## 4.4 Drop table
156+
157+
```shell
158+
DELETE http://localhost:9090/iceberg/v1/dev-iceberg-internal/namespaces/demo/tables/events
159+
Authorization: Bearer dev
160+
```
161+
162+
## 5. Cleanup — delete catalog metadata (optional)
163+
164+
```shell
165+
DELETE http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-internal
166+
Authorization: Bearer dev
167+
```
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# ICEBERG PROXY — HadoopCatalog on S3 manual test pipeline
2+
3+
## Prerequisites
4+
5+
1. `docker compose -f development/docker-compose.yml up -d`
6+
2. Start Quarkus with dev profile (port 9090)
7+
3. Run requests top-to-bottom (use the IDE run gutter on each `shell` block)
8+
9+
Variables match [`http-client.env.json`](http-client.env.json) `dev` profile.
10+
11+
## 1.1 Register catalog (management)
12+
13+
```shell
14+
POST http://localhost:9090/management/v1/catalogs
15+
Authorization: Bearer dev
16+
Content-Type: application/json
17+
18+
{
19+
"catalogId": "dev-iceberg-proxy",
20+
"catalogType": "ICEBERG",
21+
"mode": "PROXY",
22+
"spec": {
23+
"fileIoProperties": {
24+
"fs.s3a.endpoint": "http://localhost:9000",
25+
"fs.s3a.access.key": "admin",
26+
"fs.s3a.secret.key": "password",
27+
"fs.s3a.path.style.access": "true",
28+
"fs.s3a.connection.ssl.enabled": "false",
29+
"fs.s3a.aws.credentials.provider": "org.apache.hadoop.fs.s3a.SimpleAWSCredentialsProvider"
30+
},
31+
"catalogProperties": {
32+
"catalog-impl": "org.apache.iceberg.hadoop.HadoopCatalog",
33+
"warehouse": "s3a://warehouse",
34+
"io-impl": "org.apache.iceberg.aws.s3.S3FileIO",
35+
"s3.endpoint": "http://localhost:9000",
36+
"s3.access-key-id": "admin",
37+
"s3.secret-access-key": "password",
38+
"s3.path-style-access": "true",
39+
"s3.client-factory": "kasanari.fixtures.s3.NoneRegionS3FileIOAwsClientFactory"
40+
}
41+
}
42+
}
43+
```
44+
45+
## 1.2 Get catalog metadata (management)
46+
47+
```shell
48+
GET http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-proxy
49+
Authorization: Bearer dev
50+
```
51+
52+
## 2. Get catalog config (iceberg)
53+
54+
```shell
55+
GET http://localhost:9090/iceberg/v1/config?warehouse=dev-iceberg-proxy
56+
Authorization: Bearer dev
57+
```
58+
59+
## 3.1 List namespaces (root / flat catalog)
60+
61+
```shell
62+
GET http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces
63+
Authorization: Bearer dev
64+
```
65+
66+
## 3.2 List tables at root namespace (empty namespace segment)
67+
68+
```shell
69+
GET http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces//tables
70+
Authorization: Bearer dev
71+
```
72+
73+
## 4.1 Create table at root namespace
74+
75+
```shell
76+
POST http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces//tables
77+
Authorization: Bearer dev
78+
Content-Type: application/json
79+
80+
{
81+
"name": "events",
82+
"location": "s3a://warehouse/events",
83+
"schema": {
84+
"type": "struct",
85+
"fields": [
86+
{
87+
"id": 1,
88+
"name": "id",
89+
"type": "long",
90+
"required": true
91+
}
92+
]
93+
},
94+
"partition-spec": {
95+
"spec-id": 0,
96+
"fields": []
97+
},
98+
"write-order": {
99+
"order-id": 0,
100+
"fields": []
101+
},
102+
"properties": {
103+
"custom-property": "value"
104+
}
105+
}
106+
```
107+
108+
## 4.2 Get table (copy metadata.table-uuid for alter)
109+
110+
```shell
111+
GET http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces//tables/events
112+
Authorization: Bearer dev
113+
```
114+
115+
## 4.3 Alter table (replace TABLE_UUID from 4.2 response)
116+
117+
```shell
118+
POST http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces//tables/events
119+
Authorization: Bearer dev
120+
Content-Type: application/json
121+
122+
{
123+
"requirements": [
124+
{
125+
"type": "assert-table-uuid",
126+
"uuid": "TABLE_UUID"
127+
}
128+
],
129+
"updates": [
130+
{
131+
"action": "set-properties",
132+
"updates": {
133+
"custom-property": "updated-value"
134+
}
135+
}
136+
]
137+
}
138+
```
139+
140+
## 4.4 Drop table
141+
142+
```shell
143+
DELETE http://localhost:9090/iceberg/v1/dev-iceberg-proxy/namespaces//tables/events
144+
Authorization: Bearer dev
145+
```
146+
147+
## 5. Cleanup — delete catalog metadata (optional)
148+
149+
```shell
150+
DELETE http://localhost:9090/management/v1/catalogs/ICEBERG/dev-iceberg-proxy
151+
Authorization: Bearer dev
152+
```

0 commit comments

Comments
 (0)