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

Make `MAX_WAIT` and `waitIfNotFinished` in CleanerContext configurable

    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      When oldwals (and hfile) cleaner cleans stale wals (and hfiles), it will periodically check and wait the clean results from filesystem, the total wait time will be no more than a max time.

      The periodically wait and check configurations are hbase.oldwals.cleaner.thread.check.interval.msec (default is 500 ms) and hbase.regionserver.hfilecleaner.thread.check.interval.msec (default is 1000 ms).

      Meanwhile, The max time configurations are hbase.oldwals.cleaner.thread.timeout.msec and hbase.regionserver.hfilecleaner.thread.timeout.msec, they are set to 60 seconds by default.

      All support dynamic configuration.

      e.g. in the oldwals cleaning scenario, one may consider tuning hbase.oldwals.cleaner.thread.timeout.msec and hbase.oldwals.cleaner.thread.check.interval.msec

      1. While deleting a oldwal never complete (strange but possible), then delete file task needs to wait for a max of 60 seconds. Here, 60 seconds might be too long, or the opposite way is to increase more than 60 seconds in the use cases of slow file delete.
      2. The check and wait of a file delete is set to default in the period of 500 milliseconds, one might want to tune this checking period to a short interval to check more frequently or to a longer interval to avoid checking too often to manage their delete file task checking period (the longer interval may be use to avoid checking too fast while using a high latency storage).
      Show
      When oldwals (and hfile) cleaner cleans stale wals (and hfiles), it will periodically check and wait the clean results from filesystem, the total wait time will be no more than a max time. The periodically wait and check configurations are hbase.oldwals.cleaner.thread.check.interval.msec (default is 500 ms) and hbase.regionserver.hfilecleaner.thread.check.interval.msec (default is 1000 ms). Meanwhile, The max time configurations are hbase.oldwals.cleaner.thread.timeout.msec and hbase.regionserver.hfilecleaner.thread.timeout.msec, they are set to 60 seconds by default. All support dynamic configuration. e.g. in the oldwals cleaning scenario, one may consider tuning hbase.oldwals.cleaner.thread.timeout.msec and hbase.oldwals.cleaner.thread.check.interval.msec 1. While deleting a oldwal never complete (strange but possible), then delete file task needs to wait for a max of 60 seconds. Here, 60 seconds might be too long, or the opposite way is to increase more than 60 seconds in the use cases of slow file delete. 2. The check and wait of a file delete is set to default in the period of 500 milliseconds, one might want to tune this checking period to a short interval to check more frequently or to a longer interval to avoid checking too often to manage their delete file task checking period (the longer interval may be use to avoid checking too fast while using a high latency storage).
    • performance, HMaster, LogCleaner,

    Description

      When backporting HBASE-18309 in HBASE-20352, the deleteFiles calls CleanerContext.java#getResult with a waitIfNotFinished timeout to wait for notification (notify) from the fs.delete file thread. there might be two situation need to tune the MAX_WAIT in CleanerContext or waitIfNotFinished when LogClearner call getResult.

      1. fs.delete never complete (strange but possible), then we need to wait for a max of 60 seconds. here, 60 seconds might be too long
      2. getResult is waiting in the period of 500 milliseconds, but the fs.delete has completed and setFromClear is set but yet notify(). one might want to tune this 500 milliseconds to 200 or less .

      Attachments

        1. HBASE-20401.branch-1.001.patch
          19 kB
          Tak-Lon (Stephen) Wu
        2. HBASE-20401.branch-1.002.patch
          20 kB
          Tak-Lon (Stephen) Wu
        3. HBASE-20401.branch-1.003.patch
          20 kB
          Tak-Lon (Stephen) Wu
        4. HBASE-20401.master.001.patch
          6 kB
          Tak-Lon (Stephen) Wu
        5. HBASE-20401.master.002.patch
          8 kB
          Tak-Lon (Stephen) Wu
        6. HBASE-20401.master.003.patch
          18 kB
          Tak-Lon (Stephen) Wu
        7. HBASE-20401.master.004.patch
          19 kB
          Tak-Lon (Stephen) Wu
        8. HBASE-20401.master.005.patch
          19 kB
          Tak-Lon (Stephen) Wu
        9. HBASE-20401.master.006.patch
          20 kB
          Tak-Lon (Stephen) Wu
        10. HBASE-20401.master.007.patch
          20 kB
          Tak-Lon (Stephen) Wu

        Issue Links

          Activity

            People

              taklwu Tak-Lon (Stephen) Wu
              taklwu Tak-Lon (Stephen) Wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: