Source:
<code>public static void init(Properties config) throws IOException { if(config.getProperty(IS_ENABLED_PROPERTY,"false").equalsIgnoreCase("true")){ isEnabled=true; threeLevelCache.put(LOCAL_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(MIRROR_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(MERGED_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(PURGER_SERVICE, new HashMap<String , Map<String, Metric>>()); registry= new MetricRegistry(); }else{ return; } timeBetweenPolls = Integer.parseInt(config.getProperty(REPORTING_PERIOD , "10")); <START> slidingwindowtime = Integer.parseInt(config.getProperty(REPORTING_PERIOD, "10")); <END> if (config.getProperty(GANGLIA, "false").equalsIgnoreCase("true")) { final GMetric ganglia = new GMetric(config.getProperty(GANGLIA_SERVERNAME), Integer.parseInt(config.getProperty(GANGLIA_PORT)), UDPAddressingMode.MULTICAST, 1); GangliaReporter reporter = GangliaReporter.forRegistry(registry) .convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS) .build(ganglia); reporterMap.put(GANGLIA, reporter); LOG.info("Ganglia Reporter registered"); } if (config.getProperty(CONSOLE, "false").equalsIgnoreCase("true")) { ConsoleReporter reporter = ConsoleReporter.forRegistry(registry) .convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS) .build(); reporterMap.put(CONSOLE, reporter); LOG.info("Console reporter registered"); } if (reporterMap.size() == 0) { LOG.warn("No reporter registered"); } }</code><technical_language>Remove SLIDING_WINDOW_TIME metric property well. assign timeBetweenPolls sliding window time instead of reprising REPORTING_PERIOD property</technical_language>

Target:
public static void init(Properties config) throws IOException { if(config.getProperty(IS_ENABLED_PROPERTY,"false").equalsIgnoreCase("true")){ isEnabled=true; threeLevelCache.put(LOCAL_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(MIRROR_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(MERGED_SERVICE, new HashMap<String , Map<String, Metric>>()); threeLevelCache.put(PURGER_SERVICE, new HashMap<String , Map<String, Metric>>()); registry= new MetricRegistry(); }else{ return; } timeBetweenPolls = Integer.parseInt(config.getProperty(REPORTING_PERIOD , "10")); if (config.getProperty(GANGLIA, "false").equalsIgnoreCase("true")) { final GMetric ganglia = new GMetric(config.getProperty(GANGLIA_SERVERNAME), Integer.parseInt(config.getProperty(GANGLIA_PORT)), UDPAddressingMode.MULTICAST, 1); GangliaReporter reporter = GangliaReporter.forRegistry(registry) .convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS) .build(ganglia); reporterMap.put(GANGLIA, reporter); LOG.info("Ganglia Reporter registered"); } if (config.getProperty(CONSOLE, "false").equalsIgnoreCase("true")) { ConsoleReporter reporter = ConsoleReporter.forRegistry(registry) .convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS) .build(); reporterMap.put(CONSOLE, reporter); LOG.info("Console reporter registered"); } if (reporterMap.size() == 0) { LOG.warn("No reporter registered"); } }