roryqi opened a new issue, #10841:
URL: https://github.com/apache/gravitino/issues/10841
### Version
main branch
### Describe what's wrong
docker run --rm -d --name grav-plain -p 29001:9001 apache/gravitino:1.2.0
sleep 15
# Defect 1: /plan is advertised with a malformed URL template.
# Gravitino advertises: POST /v1/{prefix}/tables/{table}/plan
# Iceberg REST OpenAPI spec (apache/iceberg main, operationId planTableScan)
defines:
# POST
/v1/{prefix}/namespaces/{namespace}/tables/{table}/plan
# The /namespaces/{namespace} segment is missing from Gravitino's
advertisement.
curl -s http://localhost:29001/iceberg/v1/config | python3 -m json.tool |
grep plan
# Create namespace and table so the next probe isn't a table-lookup failure
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"namespace": ["t"]}' \
http://localhost:29001/iceberg/v1/namespaces
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"name": "tbl", "schema": {"type": "struct", "schema-id": 0, "fields":
[{"id": 1, "name": "id", "type": "long", "required": false}]}}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables
# Defect 2: /plan is not wired as a Jersey route at either path.
# Both probes below return 500-wrapped javax.ws.rs.NotFoundException
# from org.glassfish.jersey.server.ServerRuntime — no route registered,
# not an Iceberg-handler table-lookup miss.
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/tables/tbl/plan
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables/tbl/plan
### Error message and/or stacktrace
docker run --rm -d --name grav-plain -p 29001:9001 apache/gravitino:1.2.0
sleep 15
# Defect 1: /plan is advertised with a malformed URL template.
# Gravitino advertises: POST /v1/{prefix}/tables/{table}/plan
# Iceberg REST OpenAPI spec (apache/iceberg main, operationId planTableScan)
defines:
# POST
/v1/{prefix}/namespaces/{namespace}/tables/{table}/plan
# The /namespaces/{namespace} segment is missing from Gravitino's
advertisement.
curl -s http://localhost:29001/iceberg/v1/config | python3 -m json.tool |
grep plan
# Create namespace and table so the next probe isn't a table-lookup failure
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"namespace": ["t"]}' \
http://localhost:29001/iceberg/v1/namespaces
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"name": "tbl", "schema": {"type": "struct", "schema-id": 0, "fields":
[{"id": 1, "name": "id", "type": "long", "required": false}]}}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables
# Defect 2: /plan is not wired as a Jersey route at either path.
# Both probes below return 500-wrapped javax.ws.rs.NotFoundException
# from org.glassfish.jersey.server.ServerRuntime — no route registered,
# not an Iceberg-handler table-lookup miss.
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/tables/tbl/plan
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables/tbl/plan
### How to reproduce
docker run --rm -d --name grav-plain -p 29001:9001 apache/gravitino:1.2.0
sleep 15
# Defect 1: /plan is advertised with a malformed URL template.
# Gravitino advertises: POST /v1/{prefix}/tables/{table}/plan
# Iceberg REST OpenAPI spec (apache/iceberg main, operationId planTableScan)
defines:
# POST
/v1/{prefix}/namespaces/{namespace}/tables/{table}/plan
# The /namespaces/{namespace} segment is missing from Gravitino's
advertisement.
curl -s http://localhost:29001/iceberg/v1/config | python3 -m json.tool |
grep plan
# Create namespace and table so the next probe isn't a table-lookup failure
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"namespace": ["t"]}' \
http://localhost:29001/iceberg/v1/namespaces
curl -sS -X POST -H "Content-Type: application/json" \
-d '{"name": "tbl", "schema": {"type": "struct", "schema-id": 0, "fields":
[{"id": 1, "name": "id", "type": "long", "required": false}]}}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables
# Defect 2: /plan is not wired as a Jersey route at either path.
# Both probes below return 500-wrapped javax.ws.rs.NotFoundException
# from org.glassfish.jersey.server.ServerRuntime — no route registered,
# not an Iceberg-handler table-lookup miss.
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/tables/tbl/plan
curl -i -sS -X POST -H "Content-Type: application/json" -d '{"select":
["*"]}' \
http://localhost:29001/iceberg/v1/namespaces/t/tables/tbl/plan
### Additional context
_No response_
--
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]