This is an automated email from the ASF dual-hosted git repository. kturner 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 f0649b9d95 Fixes cloning tables (#3784) f0649b9d95 is described below commit f0649b9d958cdc4127bf6b126a3705a684ebaef6 Author: Keith Turner <ktur...@apache.org> AuthorDate: Fri Sep 29 16:58:59 2023 -0400 Fixes cloning tables (#3784) Cloning tables was not copying the hosting goal which left the cloned table unscannable. Changes clone table to copy hosting goal. --- .../java/org/apache/accumulo/server/util/MetadataTableUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java index cad4381c53..1a2db0d106 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java +++ b/server/base/src/main/java/org/apache/accumulo/server/util/MetadataTableUtil.java @@ -22,6 +22,7 @@ import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterrup import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.CLONED; import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.DIR; import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.FILES; +import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.HOSTING_GOAL; import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LAST; import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOCATION; import static org.apache.accumulo.core.metadata.schema.TabletMetadata.ColumnType.LOGS; @@ -417,7 +418,7 @@ public class MetadataTableUtil { } private static Iterable<TabletMetadata> createCloneScanner(String testTableName, TableId tableId, - AccumuloClient client) throws TableNotFoundException { + AccumuloClient client) { String tableName; Range range; @@ -434,13 +435,12 @@ public class MetadataTableUtil { } return TabletsMetadata.builder(client).scanTable(tableName).overRange(range).checkConsistency() - .saveKeyValues().fetch(FILES, LOCATION, LAST, CLONED, PREV_ROW, TIME).build(); + .saveKeyValues().fetch(FILES, LOCATION, LAST, CLONED, PREV_ROW, TIME, HOSTING_GOAL).build(); } @VisibleForTesting public static void initializeClone(String testTableName, TableId srcTableId, TableId tableId, - AccumuloClient client, BatchWriter bw) - throws TableNotFoundException, MutationsRejectedException { + AccumuloClient client, BatchWriter bw) throws MutationsRejectedException { Iterator<TabletMetadata> ti = createCloneScanner(testTableName, srcTableId, client).iterator();