dimas-b commented on code in PR #3135: URL: https://github.com/apache/polaris/pull/3135#discussion_r2557183760
########## persistence/nosql/persistence/cdi/quarkus/src/main/java/org/apache/polaris/persistence/nosql/quarkus/backend/MongoDbBackendBuilder.java: ########## @@ -0,0 +1,49 @@ +/* + * 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.persistence.nosql.quarkus.backend; + +import com.mongodb.client.MongoClient; +import io.quarkus.arc.Arc; +import io.quarkus.mongodb.runtime.MongoClientBeanUtil; +import io.quarkus.mongodb.runtime.MongoClients; +import jakarta.enterprise.context.Dependent; +import jakarta.inject.Inject; +import org.apache.polaris.persistence.nosql.api.backend.Backend; +import org.apache.polaris.persistence.nosql.mongodb.MongoDbBackendConfig; +import org.apache.polaris.persistence.nosql.mongodb.MongoDbBackendFactory; +import org.eclipse.microprofile.config.inject.ConfigProperty; + +@BackendType(MongoDbBackendFactory.NAME) +@Dependent +class MongoDbBackendBuilder implements BackendBuilder { Review Comment: Would it be possible to (re-)structure CDI objects in a way that will not mix multiple backends in the same general-purpose module? I imagine when new backends are added, it would be preferable to keep their code isolated in their respective modules as much as possible. In other words, is it possible to build a server with classes from just one particular backend implementation present on the class path? ########## LICENSE: ########## @@ -338,6 +338,9 @@ This product includes code from Project Nessie. * helm/polaris/templates/servicemonitor.yaml * helm/polaris/templates/storage.yaml +Code underneath the components/persistence directory, especially pluggable object types, index related, cache, Review Comment: `components/persistence` does not exist in the current `main` 🤔 Shall we list individual files (as above)? ########## persistence/nosql/persistence/cdi/quarkus/build.gradle.kts: ########## @@ -0,0 +1,66 @@ +/* + * 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. + */ + +plugins { + id("org.kordamp.gradle.jandex") + id("polaris-server") +} + +description = "Polaris NoSQL persistence, providers for Quarkus." + +dependencies { + implementation(project(":polaris-persistence-nosql-cdi-common")) + implementation(project(":polaris-persistence-nosql-api")) + implementation(project(":polaris-persistence-nosql-inmemory")) + implementation(project(":polaris-persistence-nosql-mongodb")) Review Comment: side note: this is related to my comment on `MongoDbBackendBuilder` -- 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]
