From f197bbb9dc6fad5916c6734c7bebf2c4e9699255 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Tue, 17 Dec 2024 13:08:01 +0100 Subject: [PATCH] Code cleanup (#21177) Co-authored-by: Matthias Oesterheld <33032967+moesterheld@users.noreply.github.com> --- .../graylog/datanode/configuration/DatanodeConfiguration.java | 2 -- .../datanode/configuration/DatanodeConfigurationProvider.java | 1 - .../beans/impl/OpensearchCommonConfigurationBean.java | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfiguration.java b/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfiguration.java index 4a2ef38e0605..3b78df4747ea 100644 --- a/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfiguration.java +++ b/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfiguration.java @@ -16,7 +16,6 @@ */ package org.graylog.datanode.configuration; -import org.graylog.datanode.OpensearchDistribution; import org.graylog2.security.IndexerJwtAuthTokenProvider; /** @@ -27,7 +26,6 @@ public record DatanodeConfiguration( OpensearchDistributionProvider opensearchDistributionProvider, DatanodeDirectories datanodeDirectories, int processLogsBufferSize, - String opensearchHeap, IndexerJwtAuthTokenProvider indexerJwtAuthTokenProvider ) { } diff --git a/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfigurationProvider.java b/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfigurationProvider.java index ae4f7a606179..3cfc53f0d411 100644 --- a/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfigurationProvider.java +++ b/data-node/src/main/java/org/graylog/datanode/configuration/DatanodeConfigurationProvider.java @@ -40,7 +40,6 @@ public DatanodeConfigurationProvider( opensearchDistributionProvider, DatanodeDirectories.fromConfiguration(localConfiguration, nodeId), localConfiguration.getProcessLogsBufferSize(), - localConfiguration.getOpensearchHeap(), jwtTokenProvider ); } diff --git a/data-node/src/main/java/org/graylog/datanode/opensearch/configuration/beans/impl/OpensearchCommonConfigurationBean.java b/data-node/src/main/java/org/graylog/datanode/opensearch/configuration/beans/impl/OpensearchCommonConfigurationBean.java index 6705e69244fa..a51bb0a1112d 100644 --- a/data-node/src/main/java/org/graylog/datanode/opensearch/configuration/beans/impl/OpensearchCommonConfigurationBean.java +++ b/data-node/src/main/java/org/graylog/datanode/opensearch/configuration/beans/impl/OpensearchCommonConfigurationBean.java @@ -43,8 +43,8 @@ public DatanodeConfigurationPart buildConfigurationPart(OpensearchConfigurationP return DatanodeConfigurationPart.builder() .properties(commonOpensearchConfig(buildParams)) .nodeRoles(localConfiguration.getNodeRoles()) - .javaOpt("-Xms%s".formatted(datanodeConfiguration.opensearchHeap())) - .javaOpt("-Xmx%s".formatted(datanodeConfiguration.opensearchHeap())) + .javaOpt("-Xms%s".formatted(localConfiguration.getOpensearchHeap())) + .javaOpt("-Xmx%s".formatted(localConfiguration.getOpensearchHeap())) .javaOpt("-Dopensearch.transport.cname_in_publish_address=true") .build(); }