-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Search before asking
- I searched in the issues and found nothing similar.
Paimon version
1.3.1
Compute Engine
Flink 2.1.1.
Minimal reproduce step
using Paimon Java API, try to list tables in existing Iceberg REST catalog namespace:
//> using dep "org.apache.paimon:paimon-api:1.3.1"
import org.apache.paimon.options.Options
import org.apache.paimon.rest.RESTApi
import java.util.List
import org.apache.paimon.options.CatalogOptions.WAREHOUSE
import org.apache.paimon.rest.RESTCatalogOptions.DLF_ACCESS_KEY_ID
import org.apache.paimon.rest.RESTCatalogOptions.DLF_ACCESS_KEY_SECRET
import org.apache.paimon.rest.RESTCatalogOptions.TOKEN
import org.apache.paimon.rest.RESTCatalogOptions.TOKEN_PROVIDER
import org.apache.paimon.rest.RESTCatalogOptions.URI
def setBearToken(options: Options) =
options.set(TOKEN_PROVIDER, "bear")
options.set(TOKEN, "<token>")
@main def testCatalog =
val options = Options()
options.set(URI, "http://your-url-here/iceberg/")
options.set(WAREHOUSE, "nessie_warehouse");
setBearToken(options)
val api = new RESTApi(options)
val tables = api.listTables("default")
println(tables)REST requests reach my REST Catalog server, but I see it replies with 404 status
What doesn't meet your expectations?
list tables should return empty list, but it fails with exception:
Exception in thread "main" org.apache.paimon.rest.exceptions.NoSuchResourceException:
at org.apache.paimon.rest.DefaultErrorHandler.accept(DefaultErrorHandler.java:62)
at org.apache.paimon.rest.DefaultErrorHandler.accept(DefaultErrorHandler.java:35)
at org.apache.paimon.rest.HttpClient.exec(HttpClient.java:156)
at org.apache.paimon.rest.HttpClient.get(HttpClient.java:81)
at org.apache.paimon.rest.RESTApi.lambda$listTables$1(RESTApi.java:328)
at org.apache.paimon.rest.RESTApi.listDataFromPageApi(RESTApi.java:1307)
at org.apache.paimon.rest.RESTApi.listTables(RESTApi.java:326)
at catalogTest$package$.testCatalog(catalogTest.scala:26)
at testCatalog.main(catalogTest.scala:19)Anything else?
It seems Paimon uses "databases" instead of "namespaces" concept.
Are you willing to submit a PR?
- I'm willing to submit a PR!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working