Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Master Mentor

When we access an HDFS directory using Ambari FileView then we see max 5000 sub directories/contents per page via File View. As following:

We see a message "Showing 5000 files or folders of xxxx".

93596-fileview-5000-perpagelimit.png



The default "views.files.max.files.per.page" limit is set to 5000 as following: /ambari/view/commons/hdfs/FileOperationService.java#L53-L56

This property was added from Ambari 2.6 as part of JIRA: https://issues.apache.org/jira/browse/AMBARI-21890 to avoid browser hung state while opening a HDFS folder which has huge number of files.

So if user wants to see more items per page then it can be achieved as following:

1. In order to set/add a new property with the value with a bit large page size please adjust the following property inside "ambari.properties". For example i am setting it to 7000

# grep 'views.files.max.files.per.page' /etc/ambari-server/conf/ambari.properties
views.files.max.files.per.page=7000


2. Then restart the Ambari Server.

# ambari-server restart


3. Once ambari server is restarted then check the File View again to verify if it is showing the mentioned number of per pages or not?

4. After accessing the File View directories we should also see the ambari-server.log the pagination value reflected properly or not?

# grep 'maxFilesPerPageProperty' /var/log/ambari-server/ambari-server.log
INFO [ambari-client-thread-38] FileOperationService:69 - maxFilesPerPageProperty = 7000

.

779 Views
0 Kudos
webinar banner
Version history
Last update:
‎08-17-2019 05:49 AM
Updated by:
Contributors
meetups banner