RM and JHS volume management
Describes the RM volume sharding and separating Resource Manager (RM) and Job History Server (JHS) volume.
Overview
If all the data of YARN Resource Manager (RM) is stored in a single
data
volume:
- The amount of data stored increases over a time, and the data volume becomes too large.
- The RM has to write to the same volume multiple times, for every application. This slows down the application response, and affects the user experience.
Data sharding overcomes this limitation by splitting the large volume of data in to smaller chunks, called shards, and by storing the data across multiple nodes. Data sharding helps to improve the response time, and to scale the RM operations efficiently.
Prerequisites for Sharding the RM Volume
IMPORTANT
You must either separate the RM and JHS volumes together with RM volume
sharding, or separate the RM and JHS volumes without using RM volume sharding. Using only RM
volume sharding is not supported.- Starting from EEP 8.1.0 or higher, this feature is available by default.
- Cluster must not have any jobs running before separating a volume for Job History Server (JHS).
Sharding the RM Volume
By Default, both Resource Manager (RM) and Job History Server (JHS) services are stored in
the same volume at MapR FS as follows:
volumename - mapr.resourcemanager.volume mountdir - /var/mapr/cluster/yarnTo check the EEP version, see Checking the EEP Version
Seperating RM and JHS:
NOTE
By default, RM and JHS volume are not configured as seperate volumes.-
To seperate RM and JHS volume, run the following command:
yarn.resourcemanager.dir.new-volume-path-support.enabled - true - to yarn-site.xml yarn.app.mapreduce.am.staging-dir - /var/mapr/cluster/hs - to mapred-site.xml
- Restart the RM and JHS. After successful restart, new volumes will be created and old
data will be moved to separate volume as shown in the following
example:
For ResourceManager: mountdir - /var/mapr/cluster/yarn/rm volumename - mapr.resourcemanager.volume For JobHistoryServer: mountdir - /var/mapr/cluster/hs volumename - mapr.historyserver.volume
Enable RM sharding:
NOTE
By default, RM volume sharding is not
configured.To enable RM sharding, In
yarn-site.xml file, set the
yarn.resourcemanager.dir.volume-sharding.enabled to
true, for
example:yarn.resourcemanager.dir.volume-sharding.enabled - true yarn.resourcemanager.dir.volume-count - number of ResorceManager volumes (default 4)Default value of number of shards is four, and you can increase or decrease this number as necessary.