|
@@ -95,13 +95,6 @@ public abstract class LogAggregationFileController {
|
|
|
protected static final FsPermission APP_LOG_FILE_UMASK = FsPermission
|
|
|
.createImmutable((short) (0640 ^ 0777));
|
|
|
|
|
|
- // This is temporary solution. The configuration will be deleted once
|
|
|
- // we find a more scalable method to only write a single log file per LRS.
|
|
|
- private static final String NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP
|
|
|
- = YarnConfiguration.NM_PREFIX + "log-aggregation.num-log-files-per-app";
|
|
|
- private static final int
|
|
|
- DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP = 30;
|
|
|
-
|
|
|
// This is temporary solution. The configuration will be deleted once we have
|
|
|
// the FileSystem API to check whether append operation is supported or not.
|
|
|
public static final String LOG_AGGREGATION_FS_SUPPORT_APPEND
|
|
@@ -122,12 +115,14 @@ public abstract class LogAggregationFileController {
|
|
|
*/
|
|
|
public void initialize(Configuration conf, String controllerName) {
|
|
|
this.conf = conf;
|
|
|
- int configuredRentionSize =
|
|
|
- conf.getInt(NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP,
|
|
|
- DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP);
|
|
|
+ int configuredRentionSize = conf.getInt(
|
|
|
+ YarnConfiguration.NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP,
|
|
|
+ YarnConfiguration
|
|
|
+ .DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP);
|
|
|
if (configuredRentionSize <= 0) {
|
|
|
this.retentionSize =
|
|
|
- DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP;
|
|
|
+ YarnConfiguration
|
|
|
+ .DEFAULT_NM_LOG_AGGREGATION_NUM_LOG_FILES_SIZE_PER_APP;
|
|
|
} else {
|
|
|
this.retentionSize = configuredRentionSize;
|
|
|
}
|