Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-26476

Make DefaultMemStore extensible for HStore.memstore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.4.8
    • 2.5.0, 3.0.0-alpha-2, 2.4.9
    • regionserver
    • None
    • Reviewed

    Description

      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.

          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;
        }
      

      Attachments

        Issue Links

          Activity

            People

              comnetwork chenglei
              comnetwork chenglei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: