HBASE-24040 WALFactory.Providers.multiwal causes StackOverflowError (#1338)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
WenFeiYi 2020-03-27 10:04:52 +08:00 committed by Duo Zhang
parent 9f53d35e5e
commit a4c66b3fa6
1 changed files with 5 additions and 1 deletions

View File

@ -118,7 +118,7 @@ public class RegionGroupingProvider implements WALProvider {
public static final String REGION_GROUPING_STRATEGY = "hbase.wal.regiongrouping.strategy";
public static final String DEFAULT_REGION_GROUPING_STRATEGY = Strategies.defaultStrategy.name();
/** delegate provider for WAL creation/roll/close */
/** delegate provider for WAL creation/roll/close, but not support multiwal */
public static final String DELEGATE_PROVIDER = "hbase.wal.regiongrouping.delegate.provider";
public static final String DEFAULT_DELEGATE_PROVIDER = WALFactory.Providers.defaultProvider
.name();
@ -159,6 +159,10 @@ public class RegionGroupingProvider implements WALProvider {
}
this.strategy = getStrategy(conf, REGION_GROUPING_STRATEGY, DEFAULT_REGION_GROUPING_STRATEGY);
this.providerClass = factory.getProviderClass(DELEGATE_PROVIDER, DEFAULT_DELEGATE_PROVIDER);
if (providerClass.equals(this.getClass())) {
LOG.warn("delegate provider not support multiwal, falling back to defaultProvider.");
providerClass = factory.getDefaultProvider().clazz;
}
}
private WALProvider createProvider(String group) throws IOException {