You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "chenglei (Jira)" <ji...@apache.org> on 2021/11/27 09:59:00 UTC
[jira] [Comment Edited] (HBASE-26476) Make DefaultMemStore extensible for HStore.memstore
[ https://issues.apache.org/jira/browse/HBASE-26476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449783#comment-17449783 ]
chenglei edited comment on HBASE-26476 at 11/27/21, 9:58 AM:
-------------------------------------------------------------
[~zhangduo],yes, so it could facilitate UTs, thank you very much for also pushing it to branch-2.4.
was (Author: comnetwork):
[~zhangduo],yes, thank you very much for also pushing it to branch-2.4.
> Make DefaultMemStore extensible for HStore.memstore
> ----------------------------------------------------
>
> Key: HBASE-26476
> URL: https://issues.apache.org/jira/browse/HBASE-26476
> Project: HBase
> Issue Type: Bug
> Components: regionserver
> Affects Versions: 3.0.0-alpha-1, 2.4.8
> Reporter: chenglei
> Assignee: chenglei
> Priority: Major
> Fix For: 2.5.0, 3.0.0-alpha-2, 2.4.9
>
>
> When {{HStore.memstore}} is {{DefaultMemStore}} , I find that it is impossible to extend {{DefaultMemStore}} to add some custom logic when I was work on HBASE-26465, because following code in {{HStore.getMemstore}} and {{HStore.getMemstore}} is a private method and is called in {{HStore}} ctor .We should make the {{DefaultMemStore}} extensible just as in branch-1.
> {code:java}
> switch (inMemoryCompaction) {
> case NONE:
> ms = ReflectionUtils.newInstance(DefaultMemStore.class,
> new Object[] { conf, getComparator(),
> this.getHRegion().getRegionServicesForStores()});
> break;
> default:
> Class<? extends CompactingMemStore> clz = conf.getClass(MEMSTORE_CLASS_NAME,
> CompactingMemStore.class, CompactingMemStore.class);
> ms = ReflectionUtils.newInstance(clz, new Object[]{conf, getComparator(), this,
> this.getHRegion().getRegionServicesForStores(), inMemoryCompaction});
> }
> return ms;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)