From 3c5f4c6464f10b3d59d418f24496833db6074bcc Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Wed, 7 Dec 2022 14:32:18 +0200 Subject: [PATCH] Fix bytes to MB conversion. --- .../urls_controller/configuration/ImpalaConnector.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/openaire/urls_controller/configuration/ImpalaConnector.java b/src/main/java/eu/openaire/urls_controller/configuration/ImpalaConnector.java index ee60d12..7e9d78e 100644 --- a/src/main/java/eu/openaire/urls_controller/configuration/ImpalaConnector.java +++ b/src/main/java/eu/openaire/urls_controller/configuration/ImpalaConnector.java @@ -39,7 +39,8 @@ public class ImpalaConnector { @PostConstruct public void init() { - logger.info("Max available memory to the Controller: " + (Runtime.getRuntime().maxMemory() / 1024) + " Mb."); + int mb = 1048576; + logger.info("Max available memory to the Controller: " + (Runtime.getRuntime().maxMemory() / mb) + " Mb."); try { boolean supportsBatchUpdates = jdbcTemplate.getDataSource().getConnection().getMetaData().supportsBatchUpdates(); logger.info("The database " + (supportsBatchUpdates ? "supports" : "does not support") + " \"BatchUpdates\"!");