Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-14996 Some more API cleanup for 2.0
  3. HBASE-16799

CP exposed Store should not expose unwanted APIs

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None
    • Incompatible change, Reviewed
    • Hide
      Below APIs from CP exposed Store interface are removed
      upsert(Iterable<Cell> cells, long readpoint)
      add(Cell cell)
      add(Iterable<Cell> cells)
      replayCompactionMarker(CompactionDescriptor compaction, boolean pickCompactionFiles, boolean removeFiles)
      assertBulkLoadHFileOk(Path srcPath)
      bulkLoadHFile(String srcPathStr, long sequenceId)
      bulkLoadHFile(StoreFileInfo fileInfo)
      Show
      Below APIs from CP exposed Store interface are removed upsert(Iterable<Cell> cells, long readpoint) add(Cell cell) add(Iterable<Cell> cells) replayCompactionMarker(CompactionDescriptor compaction, boolean pickCompactionFiles, boolean removeFiles) assertBulkLoadHFileOk(Path srcPath) bulkLoadHFile(String srcPathStr, long sequenceId) bulkLoadHFile(StoreFileInfo fileInfo)

    Description

      Store is exposed to CPs. The main use cases I can think of are getting store scanner and other getters which return different states like memstore size, max seqId etc. Those make sense.
      But we added many other APIs which changes the state of the memstore, bulk load files etc into this interface. Even an API which expose the memstore itself!. This allow adding mutations into memstore bypassing all steps in region. We track the memstore size per region level as well as globally. These only allow us to flush region at sizes and/or flush selected regions because of global heap pressure. Now if a CP get hold of store and/or memstore, it can add mutations with out knowledge of these size accounting and possibly OOME the RS. Similar way the bulk load related APIs. At HRegion level, there are steps done (WAL write etc) after the bulk load HFile on store. So bypassing these wont be correct.

      In this jira, plan is to remove all such leaked APIs from Store. They are called from HRegion and we can type cast to HStore to call them.

      Attachments

        1. HBASE-16799_V2.patch
          58 kB
          Anoop Sam John
        2. HBASE-16799_V3.patch
          27 kB
          Anoop Sam John
        3. HBASE-16799_V4.patch
          27 kB
          Anoop Sam John
        4. HBASE-16799.patch
          56 kB
          Anoop Sam John
        5. HBASE-16799.patch
          55 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: