public JobTrackerConfig findJobTrackerConfig(String name) { String baseName = getBaseName(name); JobTrackerConfig config = lookupByPattern(jobTrackerConfigs, baseName); if (config != null) { return config.getAsReadOnly(); } return getJobTrackerConfig(name); }
public JobTrackerConfig getJobTrackerConfig(String name) { String baseName = getBaseName(name); JobTrackerConfig config = lookupByPattern(jobTrackerConfigs, baseName); if (config != null) { return config; } JobTrackerConfig defConfig = jobTrackerConfigs.get("default"); if (defConfig == null) { defConfig = new JobTrackerConfig(); defConfig.setName("default"); addJobTrackerConfig(defConfig); } config = new JobTrackerConfig(defConfig); config.setName(name); addJobTrackerConfig(config); return config; }
public Config addJobTrackerConfig(JobTrackerConfig jobTrackerConfig) { jobTrackerConfigs.put(jobTrackerConfig.getName(), jobTrackerConfig); return this; }