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

Reduce unnecessary getFileStatus hdfs calls in TTL hfile and hlog cleanners

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.98.0, 0.95.2
    • master
    • None

    Description

      For each in file in archive dir, the TimeToLiveHFileCleaner need call getFileStatus to get the modify time of file. Actually the CleanerChore have had the file status when listing its parent dir.

      When we set the TTL to 7 days in our cluster for data security, the number of files left in archive dir is up to 65 thousands. In each clean period, TimeToLiveHFileCleaner will generate ten thousand getFileStatus call in a short time, which is very heavy for hdfs namenode.

      Fix: Change the path param to FileStatus in isFileDeletable method and reduce unnecessary getFileStatus hdfs calls in TTL cleaners.

      Attachments

        1. 8690-trunk-v3.patch
          22 kB
          Ted Yu
        2. 8690-trunk-v4.patch
          22 kB
          Ted Yu
        3. 8690v4.095.txt
          22 kB
          Michael Stack
        4. HBASE-8690-0.94-v1.patch
          20 kB
          Shaohui Liu
        5. HBASE-8690-trunk-v1.patch
          21 kB
          Shaohui Liu
        6. HBASE-8690-trunk-v2.patch
          22 kB
          Shaohui Liu

        Issue Links

          Activity

            People

              liushaohui Shaohui Liu
              liushaohui Shaohui Liu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: