This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch elasticity in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/elasticity by this push: new 17780f79d2 Create accumulo.fate table during upgrade (#4284) 17780f79d2 is described below commit 17780f79d272668d059c354ea381e7249e4b9ab8 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Wed Feb 21 07:34:25 2024 -0500 Create accumulo.fate table during upgrade (#4284) Use the same code as ZooKeeperInitializer to create the new accumulo.fate table Fixes #4167 --- .../apache/accumulo/manager/upgrade/Upgrader12to13.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java index 6d0d51a3d9..179147edc3 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader12to13.java @@ -30,12 +30,14 @@ import java.util.Map.Entry; import org.apache.accumulo.core.Constants; import org.apache.accumulo.core.client.admin.TabletAvailability; +import org.apache.accumulo.core.clientImpl.Namespace; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.data.Key; import org.apache.accumulo.core.data.Mutation; import org.apache.accumulo.core.data.TableId; import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.fate.zookeeper.ZooUtil; +import org.apache.accumulo.core.manager.state.tables.TableState; import org.apache.accumulo.core.metadata.AccumuloTable; import org.apache.accumulo.core.metadata.schema.Ample.DataLevel; import org.apache.accumulo.core.metadata.schema.Ample.TabletsMutator; @@ -49,6 +51,7 @@ import org.apache.accumulo.core.schema.Section; import org.apache.accumulo.core.security.Authorizations; import org.apache.accumulo.server.ServerContext; import org.apache.accumulo.server.conf.store.TablePropKey; +import org.apache.accumulo.server.tables.TableManager; import org.apache.accumulo.server.util.PropUtil; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.data.Stat; @@ -74,6 +77,8 @@ public class Upgrader12to13 implements Upgrader { @Override public void upgradeRoot(ServerContext context) { + LOG.info("Creating table {}", AccumuloTable.FATE.tableName()); + createFateTable(context); LOG.info("Looking for partial splits"); handlePartialSplits(context, AccumuloTable.ROOT.tableName()); LOG.info("setting metadata table hosting availability"); @@ -100,6 +105,16 @@ public class Upgrader12to13 implements Upgrader { removeCompactColumnsFromTable(context, AccumuloTable.METADATA.tableName()); } + private void createFateTable(ServerContext context) { + try { + TableManager.prepareNewTableState(context, AccumuloTable.FATE.tableId(), + Namespace.ACCUMULO.id(), AccumuloTable.FATE.tableName(), TableState.ONLINE, + ZooUtil.NodeExistsPolicy.SKIP); + } catch (KeeperException | InterruptedException e) { + throw new IllegalStateException("Error creating table: " + AccumuloTable.FATE.tableName(), e); + } + } + private void removeCompactColumnsFromRootTabletMetadata(ServerContext context) { var rootBase = ZooUtil.getRoot(context.getInstanceID()) + ZROOT_TABLET;