Source:
<code>public static void resetConfigs(String filePath) { resetCount++; hadoopConfiguration = null; hdfsUtils = null; jarCopyed = false; LbLogsConfiguration lbLogsConf; if (filePath == null) { lbLogsConf = new LbLogsConfiguration(); } else { lbLogsConf = new LbLogsConfiguration(StaticFileUtils.expandUser(filePath)); } jarCopyed = false; cacheDir = lbLogsConf.getString(LbLogsConfigurationKeys.rawlogs_cache_dir); backupDir = lbLogsConf.getString(LbLogsConfigurationKeys.rawlogs_backup_dir); fileSystemRootDir = lbLogsConf.getString(LbLogsConfigurationKeys.filesystem_root_dir); localJobsJarPath = lbLogsConf.getString(LbLogsConfigurationKeys.job_jar_path); hadoopXmlFile = lbLogsConf.getString(LbLogsConfigurationKeys.hadoop_xml_file); mapreduceInputPrefix = lbLogsConf.getString(LbLogsConfigurationKeys.mapreduce_input_prefix); mapreduceOutputPrefix = lbLogsConf.getString(LbLogsConfigurationKeys.mapreduce_output_prefix); fileRegion = lbLogsConf.getString(LbLogsConfigurationKeys.files_region); hdfsUserName = lbLogsConf.getString(LbLogsConfigurationKeys.hdfs_user_name); hdfsJobsJarPath = lbLogsConf.getString(LbLogsConfigurationKeys.hdfs_job_jar_path); numReducers = lbLogsConf.getString(LbLogsConfigurationKeys.num_reducers); <START> daysOfLZOsToKeep = getIntOrDefault(lbLogsConf, LbLogsConfigurationKeys.days_of_lzos_to_keep, 90); <END> daysOfZipsToKeep = getIntOrDefault(lbLogsConf, LbLogsConfigurationKeys.days_of_zips_to_keep, 7); HdfsBlockSize = getIntOrDefault(lbLogsConf, LbLogsConfigurationKeys.hdfs_block_size_megs, 128); replicationCount = getIntOrDefault(lbLogsConf, LbLogsConfigurationKeys.replication_count, 2); }</code><technical_language>pick: method default, good practice name constants. In this case 'DEFAULT_DAYS_OF_LZO_RETENTION' whatever. applies other config values</technical_language>

Target:
public static void resetConfigs(String filePath) { resetCount++; hadoopConfiguration = null; hdfsUtils = null; jarCopyed = false; LbLogsConfiguration lbLogsConf; if (filePath == null) { lbLogsConf = new LbLogsConfiguration(); } else { lbLogsConf = new LbLogsConfiguration(StaticFileUtils.expandUser(filePath)); } jarCopyed = false; cacheDir = lbLogsConf.getString(LbLogsConfigurationKeys.rawlogs_cache_dir); backupDir = lbLogsConf.getString(LbLogsConfigurationKeys.rawlogs_backup_dir); fileSystemRootDir = lbLogsConf.getString(LbLogsConfigurationKeys.filesystem_root_dir); localJobsJarPath = lbLogsConf.getString(LbLogsConfigurationKeys.job_jar_path); hadoopXmlFile = lbLogsConf.getString(LbLogsConfigurationKeys.hadoop_xml_file); mapreduceInputPrefix = lbLogsConf.getString(LbLogsConfigurationKeys.mapreduce_input_prefix); mapreduceOutputPrefix = lbLogsConf.getString(LbLogsConfigurationKeys.mapreduce_output_prefix); fileRegion = lbLogsConf.getString(LbLogsConfigurationKeys.files_region); hdfsUserName = lbLogsConf.getString(LbLogsConfigurationKeys.hdfs_user_name); hdfsJobsJarPath = lbLogsConf.getString(LbLogsConfigurationKeys.hdfs_job_jar_path); numReducers = lbLogsConf.getString(LbLogsConfigurationKeys.num_reducers); daysOfLZOsToKeep = getInt(lbLogsConf, LbLogsConfigurationKeys.days_of_lzos_to_keep); daysOfZipsToKeep = getInt(lbLogsConf, LbLogsConfigurationKeys.days_of_zips_to_keep); hdfsBlockSize = getInt(lbLogsConf, LbLogsConfigurationKeys.hdfs_block_size_megs); replicationCount = getInt(lbLogsConf, LbLogsConfigurationKeys.replication_count); }