From 29f7758e74199458b8d52bf8ffa9f2d7ed03e506 Mon Sep 17 00:00:00 2001 From: Gian Merlino Date: Thu, 11 Feb 2016 13:51:04 -0800 Subject: [PATCH] PropertiesModule: Print properties, processors, totalMemory on startup. --- .../main/java/io/druid/guice/PropertiesModule.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/processing/src/main/java/io/druid/guice/PropertiesModule.java b/processing/src/main/java/io/druid/guice/PropertiesModule.java index 51165f64489..dfc1abf11b2 100644 --- a/processing/src/main/java/io/druid/guice/PropertiesModule.java +++ b/processing/src/main/java/io/druid/guice/PropertiesModule.java @@ -21,6 +21,7 @@ package io.druid.guice; import com.google.common.base.Charsets; import com.google.common.base.Throwables; +import com.google.common.collect.Ordering; import com.google.inject.Binder; import com.google.inject.Module; import com.metamx.common.guava.CloseQuietly; @@ -86,6 +87,16 @@ public class PropertiesModule implements Module } } + log.info( + "Loaded properties into JVM with processors[%,d], memory[%,d].", + Runtime.getRuntime().availableProcessors(), + Runtime.getRuntime().totalMemory() + ); + + for (String propertyName : Ordering.natural().sortedCopy(props.stringPropertyNames())) { + log.info("* %s: %s", propertyName, props.getProperty(propertyName)); + } + binder.bind(Properties.class).toInstance(props); } }