String graphitePort = properties.getProperty(METRICCATCHER_GRAPHITE_PORT);
if (graphiteHost != null && graphitePort != null) {
String hostname = InetAddress.getLocalHost().getHostName();
logger.info("Creating Graphite reporter pointed at " + graphiteHost + ":" + graphitePort + " with prefix " + hostname);
GraphiteReporter graphiteReporter = new GraphiteReporter(graphiteHost, Integer.parseInt(graphitePort), hostname);
graphiteReporter.start(reportingInterval, TimeUnit.SECONDS);
}
int maxMetrics = Integer.parseInt(properties.getProperty(METRICCATCHER_MAX_METRICS, "500"));
logger.info("Max metrics: " + maxMetrics);
Map<String, Metric> lruMap = new LRUMap<String, Metric>(10, maxMetrics);