|
24 | 24 | import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; |
25 | 25 | import org.apache.hadoop.hbase.client.TableDescriptor; |
26 | 26 | import org.apache.hadoop.hbase.client.TableDescriptorBuilder; |
| 27 | +import org.apache.hadoop.hbase.mob.MobUtils; |
27 | 28 | import org.apache.hadoop.hbase.procedure2.util.StringUtils; |
28 | 29 | import org.apache.hadoop.hbase.regionserver.HRegionFileSystem; |
29 | 30 | import org.apache.hadoop.hbase.regionserver.StoreContext; |
@@ -118,7 +119,15 @@ public static Class<? extends StoreFileTracker> getTrackerClass(String trackerNa |
118 | 119 |
|
119 | 120 | public static StoreFileTracker create(Configuration conf, boolean isPrimaryReplica, |
120 | 121 | StoreContext ctx) { |
121 | | - Class<? extends StoreFileTracker> tracker = getTrackerClass(conf); |
| 122 | + Class<? extends StoreFileTracker> tracker; |
| 123 | + if ( |
| 124 | + ctx != null && ctx.getRegionInfo().getEncodedName() |
| 125 | + .equals(MobUtils.getMobRegionInfo(ctx.getTableName()).getEncodedName()) |
| 126 | + ) { |
| 127 | + tracker = Trackers.DEFAULT.clazz; |
| 128 | + } else { |
| 129 | + tracker = getTrackerClass(conf); |
| 130 | + } |
122 | 131 | LOG.debug("instantiating StoreFileTracker impl {}", tracker.getName()); |
123 | 132 | return ReflectionUtils.newInstance(tracker, conf, isPrimaryReplica, ctx); |
124 | 133 | } |
@@ -186,7 +195,7 @@ public static TableDescriptor updateWithTrackerConfigs(Configuration conf, |
186 | 195 | // descriptors with the SFT impl specific configs. By the time this happens, the table has no |
187 | 196 | // regions nor stores yet, so it can't create a proper StoreContext. |
188 | 197 | if (StringUtils.isEmpty(descriptor.getValue(TRACKER_IMPL))) { |
189 | | - StoreFileTracker tracker = StoreFileTrackerFactory.create(conf, true, null); |
| 198 | + StoreFileTracker tracker = create(conf, true, null); |
190 | 199 | TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(descriptor); |
191 | 200 | return tracker.updateWithTrackerConfigs(builder).build(); |
192 | 201 | } |
|
0 commit comments