dimas-b commented on issue #147:
URL: https://github.com/apache/polaris/issues/147#issuecomment-3304181672

   List namespace pagination is supported in Polaris 1.1.0 (upcoming release), 
but it's not enabled by default.
   
   Setting the `LIST_PAGINATION_ENABLED` feature flag to `true` enables it.
   
   For example, using 1.1.0 RC0:
   ```
   $ env POLARIS_BOOTSTRAP_CREDENTIALS=POLARIS,pol123,pol123s 
POLARIS_JAVA_OPTS="-Dpolaris.features.LIST_PAGINATION_ENABLED=true" bin/server
   ```
   In Spark:
   ```
   $ bin/spark-sql \
            --packages 
org.apache.iceberg:iceberg-spark-runtime-3.5_2.12:1.9.0,org.apache.iceberg:iceberg-aws-bundle:1.9.0
 \
            --conf 
spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
 \
            --conf 
spark.sql.catalog.polaris=org.apache.iceberg.spark.SparkCatalog \
            --conf spark.sql.catalog.polaris.type=rest \
            --conf 
spark.sql.catalog.polaris.uri=http://localhost:8181/api/catalog \
            --conf spark.sql.catalog.polaris.token-refresh-enabled=false \
            --conf spark.sql.catalog.polaris.warehouse=polaris \
            --conf spark.sql.catalog.polaris.scope=PRINCIPAL_ROLE:ALL \
            --conf 
spark.sql.catalog.polaris.header.X-Iceberg-Access-Delegation=vended-credentials 
\
            --conf spark.sql.catalog.polaris.credential=pol123:pol123s
   ```
   In curl:
   ```
   $ curl -H "Authorization: Bearer $POLARIS_TOKEN" -X GET 
'http://localhost:8181/api/catalog/v1/polaris/namespaces'
   {"namespaces":[["ns1"],["ns2"],["ns3"]],"next-page-token":null}
   $ curl -H "Authorization: Bearer $POLARIS_TOKEN" -X GET 
'http://localhost:8181/api/catalog/v1/polaris/namespaces?pageSize=1'
   {"namespaces":[["ns1"]],"next-page-token":"OikKAfqAcMKAdvqAdEBlgGnK-_s="}
   $ curl -H "Authorization: Bearer $POLARIS_TOKEN" -X GET 
'http://localhost:8181/api/catalog/v1/polaris/namespaces?pageSize=1&pageToken=OikKAfqAcMKAdvqAdEBlgGnK-_s='
   {"namespaces":[["ns2"]],"next-page-token":"OikKAfqAcMKAdvqAdEBlgGnM-_s="}
   ```


-- 
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]

Reply via email to