mirror of https://github.com/apache/druid.git
PropertiesModule: Print properties, processors, totalMemory on startup.
This commit is contained in:
parent
6b45a9e4a7
commit
29f7758e74
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue