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

isMajorCompaction() check triggers lots of listStatus DFS RPC calls from HBase

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • Reviewed

    Description

      We noticed that there are lots of listStatus calls on the ColumnFamily directories within each region, coming from this codepath:

      compactionSelection()
       --> isMajorCompaction 
          --> getLowestTimestamp()
             -->  FileStatus[] stats = fs.listStatus(p);
      

      So on every compactionSelection() we're taking this hit. While not immediately an issue, just from log inspection, this accounts for quite a large number of RPCs to namenode at the moment and seems like an unnecessary load to be sending to the namenode.

      Seems like it would be easy to cache the timestamp for each opened/created StoreFile, in memory, in the region server, and avoid going to DFS each time for this information.

      Attachments

        1. Hbase-3693[r1085306].patch
          6 kB
          Liyin Tang
        2. Hbase-3693[r1085248]_2.patch
          5 kB
          Liyin Tang

        Activity

          People

            liyin Liyin Tang
            kannanm Kannan Muthukkaruppan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: