From 6af3c4cc4d9b2c96d0be49c9bd0def985789b503 Mon Sep 17 00:00:00 2001 From: James Turton Date: Tue, 13 Aug 2024 09:11:04 +0200 Subject: [PATCH] Try setting minFreeMb env var for the Splunk container. --- .github/workflows/ci.yml | 1 + .../drill/exec/store/splunk/SplunkTestSuite.java | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39c3fc0aa9e..8de4b0ce001 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,7 @@ jobs: - name: Remove swap space run : | sudo sh -c " + free -h swapoff /tmp/swapfile rm /tmp/swapfile " diff --git a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java index dc434c8f06a..b94cd5f9a87 100644 --- a/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java +++ b/contrib/storage-splunk/src/test/java/org/apache/drill/exec/store/splunk/SplunkTestSuite.java @@ -75,7 +75,8 @@ public class SplunkTestSuite extends ClusterTest { .withExposedPorts(8089, 8089) .withEnv("SPLUNK_START_ARGS", "--accept-license") .withEnv("SPLUNK_PASSWORD", SPLUNK_PASS) - .withEnv("SPLUNKD_SSL_ENABLE", "false"); + .withEnv("SPLUNKD_SSL_ENABLE", "false") + .withEnv("SPLUNK_MINFREEMB", "1000"); @BeforeClass public static void initSplunk() throws Exception { @@ -88,17 +89,6 @@ public static void initSplunk() throws Exception { startCluster(builder); splunk.start(); - splunk.execInContainer("if ! sudo grep -q 'minFileSize' /opt/splunk/etc/system/local/server.conf; then " + - "sudo chmod a+w /opt/splunk/etc/system/local/server.conf; " + - "sudo echo \"# disk usage processor settings\" >> /opt/splunk/etc/system/local/server.conf; " + - "sudo echo \"[diskUsage]\" >> /opt/splunk/etc/system/local/server.conf; " + - "sudo echo \"minFreeSpace = 2000\" >> /opt/splunk/etc/system/local/server.conf; " + - "sudo echo \"pollingFrequency = 100000\" >> /opt/splunk/etc/system/local/server.conf; " + - "sudo echo \"pollingTimerFrequency = 10\" >> /opt/splunk/etc/system/local/server.conf; " + - "sudo chmod 600 /opt/splunk/etc/system/local/server.conf; " + - "sudo /opt/splunk/bin/splunk restart; " + - "fi"); - String hostname = splunk.getHost(); Integer port = splunk.getFirstMappedPort(); StoragePluginRegistry pluginRegistry = cluster.drillbit().getContext().getStorage();