PropertiesModule: Print properties, processors, totalMemory on startup.

This commit is contained in:
Gian Merlino 2016-02-11 13:51:04 -08:00
parent 6b45a9e4a7
commit 29f7758e74
1 changed files with 11 additions and 0 deletions

View File

@ -21,6 +21,7 @@ package io.druid.guice;
import com.google.common.base.Charsets; import com.google.common.base.Charsets;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.collect.Ordering;
import com.google.inject.Binder; import com.google.inject.Binder;
import com.google.inject.Module; import com.google.inject.Module;
import com.metamx.common.guava.CloseQuietly; 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); binder.bind(Properties.class).toInstance(props);
} }
} }