keith-turner commented on code in PR #3322: URL: https://github.com/apache/accumulo/pull/3322#discussion_r1172644728
########## server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader11to12.java: ########## @@ -0,0 +1,79 @@ +/* + * 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 + * + * https://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.accumulo.manager.upgrade; + +import org.apache.accumulo.core.client.admin.TabletHostingGoal; +import org.apache.accumulo.core.data.TableId; +import org.apache.accumulo.core.metadata.MetadataTable; +import org.apache.accumulo.core.metadata.RootTable; +import org.apache.accumulo.core.metadata.schema.Ample.DataLevel; +import org.apache.accumulo.core.metadata.schema.Ample.TabletsMutator; +import org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType; +import org.apache.accumulo.core.metadata.schema.TabletsMetadata; +import org.apache.accumulo.server.ServerContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Upgrader11to12 implements Upgrader { + + private static final Logger LOG = LoggerFactory.getLogger(Upgrader11to12.class); + + @Override + public void upgradeZookeeper(ServerContext context) { + LOG.info("upgrade root - skipping, nothing to do"); + } + + @Override + public void upgradeRoot(ServerContext context) { + LOG.info("upgrade root - skipping, nothing to do"); + } + + @Override + public void upgradeMetadata(ServerContext context) { + LOG.info("upgrade metadata entries"); + addHostingGoalToRootTable(context); + addHostingGoalToMetadataTable(context); + addHostingGoalToUserTables(context); + } Review Comment: Think the following will upgrade the root tablet metadata before it loaded and the metadata table metadata before its tablets are loaded ```suggestion @Override public void upgradeZookeeper(ServerContext context) { LOG.info("upgrading metadata stored in zookeeper"); addHostingGoalToRootTable(context); } @Override public void upgradeRoot(ServerContext context) { LOG.info("upgrading metadata stored in the root table"); addHostingGoalToMetadataTable(context); } @Override public void upgradeMetadata(ServerContext context) { LOG.info("upgrade metadata stored in metadata table"); addHostingGoalToUserTables(context); } ``` -- 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]
