Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

quarkus.datasource.devservices.enabled=false
quarkus.keycloak.devservices.enabled=false
quarkus.mongodb.devservices.enabled=false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this config?


quarkus.log.level=ERROR
quarkus.log.file.enable=false
Expand Down
21 changes: 19 additions & 2 deletions runtime/defaults/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ quarkus.micrometer.enabled=true
quarkus.micrometer.export.prometheus.enabled=true
quarkus.oidc.enabled=true
quarkus.otel.enabled=true
#quarkus.mongodb.metrics.enabled=true
#quarkus.mongodb.connection-string=mongodb://localhost:27017

# ---- Runtime Configuration ----
# Below are default values for properties that can be changed in runtime.
Expand Down Expand Up @@ -128,16 +130,29 @@ polaris.features."SUPPORTED_CATALOG_CONNECTION_TYPES"=["ICEBERG_REST"]
# realm overrides
# polaris.features.realm-overrides."my-realm"."SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION"=true

# polaris.persistence.type=in-memory-atomic
# Available types:
# - in-memory - InMemoryPolarisMetaStoreManagerFactory
# - in-memory-atomic - InMemoryAtomicOperationMetaStoreManagerFactory
# - nosql (beta) - NoSQL persistence backend, define the backend type via 'polaris.persistence.nosql.backend'
# - relational-jdbc
polaris.persistence.type=in-memory
# polaris.persistence.type=relational-jdbc
# Database backend for 'nosql' persistence-type
# Available backends:
# - InMemory - for testing purposes
# - MongoDb - configure the via the Quarkus extension
# Configure the necessary MongoDB properties starting with 'quarkus.mongodb.' in this file.
# See https://quarkus.io/guides/mongodb#configuration-reference for details about these configurations.
#polaris.persistence.nosql.backend=InMemory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: whitespace


polaris.secrets-manager.type=in-memory
# if set to true it will try to start localstack at build and run time for the local environment
# https://docs.quarkiverse.io/quarkus-amazon-services/dev/amazon-rds.html#_configuration_reference for more details
quarkus.rds.devservices.enabled=false
quarkus.rds.sync-client.type=apache

## MongoDB specific configuration
#quarkus.mongodb.database=polaris
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: whitespace


polaris.file-io.type=default

polaris.event-listener.type=no-op
Expand Down Expand Up @@ -283,6 +298,8 @@ quarkus.arc.ignored-split-packages=\

## Quarkus required setting for third party indexing
# fixed at build-time
quarkus.index-dependency.agrona.group-id=org.agrona
quarkus.index-dependency.agrona.artifact-id=agrona
Comment on lines +301 to +302
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question, why do we need these two new configs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment just above (lines 298-299) explains it, does it not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexing jars is generally required for proper CDI

Copy link
Contributor

@flyrain flyrain Jan 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CDI has been there since we introduced Quarkus to Polaris without indexing jars. Why do we need them now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm understanding correctly, indexing isn't the new thing, but agrona is the new library we need to index now in addition to e.g. avro, and guava, is that right?

I do agree a bit that agrona is less ubiquitous the others here, so could be worth a quick comment in here saying what agrona does (looks like it's a fancy utils library? https://github.com/aeron-io/agrona)

In my experience avro, guava, and protobuf are ubiquitous enough that no one thinks twice seeing it in deps, but agrona might be new to some folks (like me, or maybe I'm just old-fashioned :) )

I like to lean towards over-communicating rather than risk under-communicating in comments in these cases, since things like compliance audits, etc., will have folks looking through these types of configs and anything that can avoid unnecessary questions will help save time for everyone

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, in my local env. I experimented with commenting out all of these index properties and I do not see any effect :)

I propose to open a GH issue for a more in-depth investigation and removal of them later, on main. I can take that on my TODO list. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @dimas-b , that works for me. We can always add them back if it turns out useful.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the issue: #3467

Copy link
Contributor

@dimas-b dimas-b Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did more local debugging and this indexing property does appear to be advised by Quarkus for the runtime/server build.

Here's the warning message from Quarkus when running without this property:

Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
	- org.agrona.collections.Int2ObjectHashMap (source: JacksonProcessor annotated with @com.fasterxml.jackson.databind.annotation.JsonDeserialize > org.apache.polaris.persistence.nosql.authz.api.ImmutableAclEntry$Json > org.apache.polaris.persistence.nosql.authz.api.PrivilegeSet > org.apache.polaris.persistence.nosql.authz.api.Privileges > org.agrona.collections.Int2ObjectHashMap)
	- org.agrona.collections.Object2ObjectHashMap (sources: JacksonProcessor annotated with @com.fasterxml.jackson.databind.annotation.JsonDeserialize > org.apache.polaris.persistence.nosql.authz.api.ImmutableAclEntry$Json > org.apache.polaris.persistence.nosql.authz.api.PrivilegeSet > org.apache.polaris.persistence.nosql.authz.api.Privileges > org.agrona.collections.Object2ObjectHashMap, JacksonProcessor annotated with @com.fasterxml.jackson.databind.annotation.JsonDeserialize > org.apache.polaris.persistence.nosql.authz.api.ImmutableAclEntry$Json > org.apache.polaris.persistence.nosql.authz.api.PrivilegeSet > org.apache.polaris.persistence.nosql.authz.api.Privileges > org.apache.polaris.persistence.nosql.authz.api.Acl$AclBuilder > org.agrona.collections.Object2ObjectHashMap, JacksonProcessor annotated with @com.fasterxml.jackson.databind.annotation.JsonDeserialize > org.apache.polaris.persistence.nosql.coretypes.acl.AclObj > org.apache.polaris.persistence.nosql.authz.api.Acl > org.agrona.collections.Object2ObjectHashMap)
Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.

That said, I'm investigating the reason why this message does not show up during normal build (no debugger) under #3467.

I believe this resolves this comment thread. @flyrain : WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Thanks @dimas-b !

quarkus.index-dependency.avro.group-id=org.apache.avro
quarkus.index-dependency.avro.artifact-id=avro
quarkus.index-dependency.guava.group-id=com.google.guava
Expand Down
10 changes: 10 additions & 0 deletions runtime/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ dependencies {
compileOnly(project(":polaris-immutables"))
annotationProcessor(project(":polaris-immutables", configuration = "processor"))

runtimeOnly(project(":polaris-persistence-nosql-metastore"))
runtimeOnly(project(":polaris-persistence-nosql-cdi-quarkus"))
runtimeOnly(project(":polaris-persistence-nosql-cdi-quarkus-distcache"))
runtimeOnly(project(":polaris-persistence-nosql-maintenance-impl"))
runtimeOnly(project(":polaris-persistence-nosql-metastore-maintenance"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we already did this for JDBC, adding these makes sense.

That said, looking at the build.gradle.kts, we now have test dependencies for multiple persistence implementations in the service module. The main implementation already separates persistence backends from runtime/service, reflecting that the service layer logic is designed to be abstract and agnostic to specific persistence implementations. In the long term, it might be worth migrating the persistence-backend integration tests (both JDBC and NoSQL) to separate test modules to stay consistent with this separation.

Not a blocker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support the idea of doing integration tests separately in each major plugin module (JDBC, NoSQL, etc.). OPA does that already.

It will probably add CI time due to extra Quarkus build activity, but improves isolation.

This is certainly for future discussion / follow-up PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is imho, a great use of a followup issue. The follow up would make things arguably more clean but requires a larger refactoring than the scope of this pr which currently just follows the existing model from JDBC.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consideration: #3569


implementation(platform(libs.iceberg.bom))
implementation("org.apache.iceberg:iceberg-api")
implementation("org.apache.iceberg:iceberg-core")
Expand Down Expand Up @@ -153,6 +159,10 @@ dependencies {
testImplementation("org.testcontainers:testcontainers")
testImplementation("org.testcontainers:testcontainers-postgresql")

testImplementation(project(":polaris-persistence-nosql-api"))
testImplementation(testFixtures(project(":polaris-persistence-nosql-api")))
testImplementation(project(":polaris-persistence-nosql-impl"))

testFixturesImplementation(project(":polaris-core"))
testFixturesImplementation(project(":polaris-api-management-model"))
testFixturesImplementation(project(":polaris-api-management-service"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.it.nosql;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;
import org.apache.polaris.service.it.test.PolarisApplicationIntegrationTest;

@QuarkusIntegrationTest
@TestProfile(value = NoSqlTesting.PersistenceInMemoryProfile.class)
public class NoSqlApplicationIT extends PolarisApplicationIntegrationTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.it.nosql;

import com.google.common.collect.ImmutableMap;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;
import java.util.Map;
import org.apache.polaris.service.it.PolarisRestCatalogMinIOIT;

@QuarkusIntegrationTest
@TestProfile(value = NoSqlCatalogIT.Profile.class)
public class NoSqlCatalogIT extends PolarisRestCatalogMinIOIT {
public static class Profile extends NoSqlTesting.PersistenceInMemoryProfile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()
.putAll(super.getConfigOverrides())
.put("polaris.storage.aws.access-key", MINIO_ACCESS_KEY)
.put("polaris.storage.aws.secret-key", MINIO_SECRET_KEY)
.put("polaris.features.\"SKIP_CREDENTIAL_SUBSCOPING_INDIRECTION\"", "false")
.build();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.it.nosql;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import io.quarkus.test.junit.TestProfile;
import org.apache.polaris.service.it.test.PolarisManagementServiceIntegrationTest;

@QuarkusIntegrationTest
@TestProfile(value = NoSqlTesting.PersistenceInMemoryProfile.class)
public class NoSqlManagementServiceIT extends PolarisManagementServiceIntegrationTest {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.it.nosql;

import io.quarkus.test.junit.QuarkusTestProfile;
import java.util.Map;

public final class NoSqlTesting {
private NoSqlTesting() {}

public static class PersistenceInMemoryProfile implements QuarkusTestProfile {
@Override
public Map<String, String> getConfigOverrides() {
return Map.of(
"polaris.persistence.type",
"nosql",
"polaris.persistence.nosql.backend",
"InMemory",
"polaris.persistence.auto-bootstrap-types",
"nosql");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@

package org.apache.polaris.service.catalog;

import com.google.common.collect.ImmutableMap;
import io.quarkus.test.junit.QuarkusTestProfile;
import java.util.Map;

public final class Profiles {
private Profiles() {}

public static final Map<String, String> NOSQL_IN_MEM =
ImmutableMap.<String, String>builder()
.put("polaris.persistence.type", "nosql")
.put("polaris.persistence.nosql.backend", "InMemory")
.build();

public static class DefaultProfile implements QuarkusTestProfile {
@Override
public Map<String, String> getConfigOverrides() {
Expand All @@ -41,4 +48,14 @@ public Map<String, String> getConfigOverrides() {
"true");
}
}

public static class DefaultNoSqlProfile extends DefaultProfile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()
.putAll(super.getConfigOverrides())
.putAll(NOSQL_IN_MEM)
.build();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.catalog.generic;

import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import jakarta.inject.Inject;
import java.util.List;
import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
import org.apache.polaris.core.persistence.bootstrap.RootCredentialsSet;
import org.apache.polaris.service.catalog.Profiles;

@QuarkusTest
@TestProfile(Profiles.DefaultNoSqlProfile.class)
public class PolarisGenericTableCatalogNoSqlInMemTest
extends AbstractPolarisGenericTableCatalogTest {

@Inject MetaStoreManagerFactory metaStoreManagerFactory;

@Override
protected void bootstrapRealm(String realmName) {
metaStoreManagerFactory
.bootstrapRealms(
List.of(realmName),
RootCredentialsSet.fromList(List.of(realmName + ",aClientId,aSecret")))
.get(realmName);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.polaris.service.catalog.iceberg;

import static org.apache.polaris.service.catalog.Profiles.NOSQL_IN_MEM;

import com.google.common.collect.ImmutableMap;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import jakarta.inject.Inject;
import java.util.List;
import java.util.Map;
import org.apache.polaris.core.persistence.MetaStoreManagerFactory;
import org.apache.polaris.core.persistence.bootstrap.RootCredentialsSet;
import org.apache.polaris.service.admin.PolarisAuthzTestBase;

@QuarkusTest
@TestProfile(IcebergCatalogHandlerNoSqlAuthzTest.Profile.class)
public class IcebergCatalogHandlerNoSqlAuthzTest extends AbstractIcebergCatalogHandlerAuthzTest {

public static class Profile extends PolarisAuthzTestBase.Profile {
@Override
public Map<String, String> getConfigOverrides() {
return ImmutableMap.<String, String>builder()
.putAll(super.getConfigOverrides())
.putAll(NOSQL_IN_MEM)
.build();
}
}

@Inject MetaStoreManagerFactory metaStoreManagerFactory;

@Override
protected void bootstrapRealm(String realmIdentifier) {
metaStoreManagerFactory.bootstrapRealms(List.of(realmIdentifier), RootCredentialsSet.EMPTY);
}
}
Loading