YARN-4464. Lower the default max applications stored in the RM and store. (Daniel Templeton via kasha)

This commit is contained in:
Karthik Kambatla 2016-10-11 21:41:58 -07:00
parent 7ba7092bbc
commit 6378845f9e
3 changed files with 19 additions and 7 deletions

View File

@ -719,17 +719,29 @@ public class YarnConfiguration extends Configuration {
+ "leveldb-state-store.compaction-interval-secs";
public static final long DEFAULT_RM_LEVELDB_COMPACTION_INTERVAL_SECS = 3600;
/** The maximum number of completed applications RM keeps. */
/**
* The maximum number of completed applications RM keeps. By default equals
* to {@link #DEFAULT_RM_MAX_COMPLETED_APPLICATIONS}.
*/
public static final String RM_MAX_COMPLETED_APPLICATIONS =
RM_PREFIX + "max-completed-applications";
public static final int DEFAULT_RM_MAX_COMPLETED_APPLICATIONS = 10000;
public static final int DEFAULT_RM_MAX_COMPLETED_APPLICATIONS = 1000;
/**
* The maximum number of completed applications RM state store keeps, by
* default equals to DEFAULT_RM_MAX_COMPLETED_APPLICATIONS
* The maximum number of completed applications RM state store keeps. By
* default equals to value of {@link #RM_MAX_COMPLETED_APPLICATIONS}.
*/
public static final String RM_STATE_STORE_MAX_COMPLETED_APPLICATIONS =
RM_PREFIX + "state-store.max-completed-applications";
/**
* The default value for
* {@code yarn.resourcemanager.state-store.max-completed-applications}.
* @deprecated This default value is ignored and will be removed in a future
* release. The default value of
* {@code yarn.resourcemanager.state-store.max-completed-applications} is the
* value of {@link #RM_MAX_COMPLETED_APPLICATIONS}.
*/
@Deprecated
public static final int DEFAULT_RM_STATE_STORE_MAX_COMPLETED_APPLICATIONS =
DEFAULT_RM_MAX_COMPLETED_APPLICATIONS;

View File

@ -417,7 +417,7 @@
the applications remembered in RM memory.
Any values larger than ${yarn.resourcemanager.max-completed-applications} will
be reset to ${yarn.resourcemanager.max-completed-applications}.
Note that this value impacts the RM recovery performance.Typically,
Note that this value impacts the RM recovery performance. Typically,
a smaller value indicates better performance on RM recovery.
</description>
<name>yarn.resourcemanager.state-store.max-completed-applications</name>
@ -687,7 +687,7 @@
<property>
<description>The maximum number of completed applications RM keeps. </description>
<name>yarn.resourcemanager.max-completed-applications</name>
<value>10000</value>
<value>1000</value>
</property>
<property>

View File

@ -101,7 +101,7 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
this.maxCompletedAppsInStateStore =
conf.getInt(
YarnConfiguration.RM_STATE_STORE_MAX_COMPLETED_APPLICATIONS,
YarnConfiguration.DEFAULT_RM_STATE_STORE_MAX_COMPLETED_APPLICATIONS);
this.maxCompletedAppsInMemory);
if (this.maxCompletedAppsInStateStore > this.maxCompletedAppsInMemory) {
this.maxCompletedAppsInStateStore = this.maxCompletedAppsInMemory;
}