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.