Fix bytes to MB conversion.

This commit is contained in:
Lampros Smyrnaios 2022-12-07 14:32:18 +02:00
parent 8607594f6d
commit 3c5f4c6464
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ public class ImpalaConnector {
@PostConstruct @PostConstruct
public void init() { 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 { try {
boolean supportsBatchUpdates = jdbcTemplate.getDataSource().getConnection().getMetaData().supportsBatchUpdates(); boolean supportsBatchUpdates = jdbcTemplate.getDataSource().getConnection().getMetaData().supportsBatchUpdates();
logger.info("The database " + (supportsBatchUpdates ? "supports" : "does not support") + " \"BatchUpdates\"!"); logger.info("The database " + (supportsBatchUpdates ? "supports" : "does not support") + " \"BatchUpdates\"!");