YARN-1672. YarnConfiguration is missing a default for yarn.nodemanager.log.retain-seconds (Naren Koneru via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1565866 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
60eca33e83
commit
d57c6e0fe7
|
@ -227,6 +227,9 @@ Release 2.4.0 - UNRELEASED
|
|||
YARN-1661. Fixed DS ApplicationMaster to write the correct exit log. (Vinod
|
||||
Kumar Vavilapalli via zjshen)
|
||||
|
||||
YARN-1672. YarnConfiguration is missing a default for
|
||||
yarn.nodemanager.log.retain-seconds (Naren Koneru via kasha)
|
||||
|
||||
Release 2.3.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -629,6 +629,7 @@ public class YarnConfiguration extends Configuration {
|
|||
*/
|
||||
public static final String NM_LOG_RETAIN_SECONDS = NM_PREFIX
|
||||
+ "log.retain-seconds";
|
||||
public static final long DEFAULT_NM_LOG_RETAIN_SECONDS = 3 * 60 * 60;
|
||||
|
||||
/**
|
||||
* Number of threads used in log cleanup. Only applicable if Log aggregation
|
||||
|
|
|
@ -73,7 +73,8 @@ public class NonAggregatingLogHandler extends AbstractService implements
|
|||
protected void serviceInit(Configuration conf) throws Exception {
|
||||
// Default 3 hours.
|
||||
this.deleteDelaySeconds =
|
||||
conf.getLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS, 3 * 60 * 60);
|
||||
conf.getLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS,
|
||||
YarnConfiguration.DEFAULT_NM_LOG_RETAIN_SECONDS);
|
||||
sched = createScheduledThreadPoolExecutor(conf);
|
||||
super.serviceInit(conf);
|
||||
}
|
||||
|
|
|
@ -145,7 +145,8 @@ public class TestNonAggregatingLogHandler {
|
|||
conf.set(YarnConfiguration.NM_LOG_DIRS, localLogDirsString);
|
||||
conf.setBoolean(YarnConfiguration.LOG_AGGREGATION_ENABLED, false);
|
||||
|
||||
conf.setLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS, 10800l);
|
||||
conf.setLong(YarnConfiguration.NM_LOG_RETAIN_SECONDS,
|
||||
YarnConfiguration.DEFAULT_NM_LOG_RETAIN_SECONDS);
|
||||
|
||||
DrainDispatcher dispatcher = createDispatcher(conf);
|
||||
EventHandler<ApplicationEvent> appEventHandler = mock(EventHandler.class);
|
||||
|
|
Loading…
Reference in New Issue