HBASE-26837 Set SFT config when creating TableDescriptor in TestCloneSnapshotProcedure (#4226)

Signed-off-by: Xiaolin Ha <haxiaolin@apache.org>
(cherry picked from commit 5b28d76652)
This commit is contained in:
Duo Zhang 2022-03-16 19:34:30 +08:00
parent 4dff67c2e4
commit d3629bbf16
1 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,7 @@ import org.apache.hadoop.hbase.client.TableDescriptorBuilder;
import org.apache.hadoop.hbase.procedure2.Procedure; import org.apache.hadoop.hbase.procedure2.Procedure;
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor; import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility; import org.apache.hadoop.hbase.procedure2.ProcedureTestingUtility;
import org.apache.hadoop.hbase.regionserver.storefiletracker.StoreFileTrackerFactory;
import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils; import org.apache.hadoop.hbase.snapshot.SnapshotTestingUtils;
import org.apache.hadoop.hbase.testclassification.MasterTests; import org.apache.hadoop.hbase.testclassification.MasterTests;
import org.apache.hadoop.hbase.testclassification.MediumTests; import org.apache.hadoop.hbase.testclassification.MediumTests;
@ -95,8 +96,11 @@ public class TestCloneSnapshotProcedure extends TestTableDDLProcedureBase {
return 1; return 1;
} }
public static TableDescriptor createTableDescriptor(TableName tableName, byte[]... family) { private static TableDescriptor createTableDescriptor(TableName tableName, byte[]... family) {
TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName); TableDescriptorBuilder builder =
TableDescriptorBuilder.newBuilder(tableName).setValue(StoreFileTrackerFactory.TRACKER_IMPL,
UTIL.getConfiguration().get(StoreFileTrackerFactory.TRACKER_IMPL,
StoreFileTrackerFactory.Trackers.DEFAULT.name()));
Stream.of(family).map(ColumnFamilyDescriptorBuilder::of) Stream.of(family).map(ColumnFamilyDescriptorBuilder::of)
.forEachOrdered(builder::setColumnFamily); .forEachOrdered(builder::setColumnFamily);
return builder.build(); return builder.build();