obelix74 commented on code in PR #3385: URL: https://github.com/apache/polaris/pull/3385#discussion_r2833671510
########## runtime/admin/src/main/java/org/apache/polaris/admintool/BootstrapMetricsCommand.java: ########## @@ -0,0 +1,120 @@ +/* + * 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.admintool; + +import io.smallrye.common.annotation.Identifier; +import jakarta.inject.Inject; +import java.util.List; +import org.apache.polaris.core.persistence.metrics.MetricsSchemaBootstrap; +import picocli.CommandLine; + +/** + * CLI command to bootstrap the metrics schema independently from the entity schema. + * + * <p>This command allows operators to add metrics persistence support to an existing Polaris + * deployment without re-bootstrapping the entity schema. It supports both fresh installation and + * upgrading from an older schema version to a newer one. + * + * <p>Example usage: + * + * <pre>{@code + * polaris-admin bootstrap-metrics -r my-realm + * polaris-admin bootstrap-metrics -r realm1 -r realm2 + * polaris-admin bootstrap-metrics -r my-realm --version 2 Review Comment: Walked through this. The hardcoded @Identifier("relational-jdbc") was inconsistent with how MetaStoreManagerFactory is injected (without explicit identifier). Added a MetricsSchemaBootstrap producer in AdminToolProducers. Does this address your concern? -- 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]
