You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Tao Jie (JIRA)" <ji...@apache.org> on 2019/02/19 08:58:00 UTC
[jira] [Created] (HDFS-14297) Add cache for getContentSummary()
result
Tao Jie created HDFS-14297:
------------------------------
Summary: Add cache for getContentSummary() result
Key: HDFS-14297
URL: https://issues.apache.org/jira/browse/HDFS-14297
Project: Hadoop HDFS
Issue Type: Improvement
Reporter: Tao Jie
In a large HDFS cluster, calling {{getContentSummary}} for a directory with large amount of files is very expensive. In a certain cluster with more than 100 million files, calling {{getContentSummary}} may take more than 10s and it will hold fsnamesystem lock for such a long time.
In our cluster, there are several peripheral systems calling {{getContentSummary}} periodically to monitor the status of dirs. Actually we don't need the very accurate result in most cases. We could keep a cache for those contentSummary result in namenode, with which we could avoid repeated heavy request in a span. Also we should add more restrictions to this cache: 1,its size should be limited and it should be LRU, 2, only result of heavy request would be added to this cache, eg, rpctime over 1000ms.
Any thought?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org