diff --git a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupSubSystemPaths.java b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupSubSystemPaths.java index f50c8f3ad5..61ffd1dd21 100644 --- a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupSubSystemPaths.java +++ b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupSubSystemPaths.java @@ -89,7 +89,7 @@ default Path getCgroupFreezePath(String componentName) { void handleCpuLimits(GreengrassService component, double cpu) throws IOException; - void pauseComponentProcessesCore(GreengrassService component, List processes) throws IOException; + void pauseComponentProcessesCore(GreengrassService component) throws IOException; void resumeComponentProcesses(GreengrassService component) throws IOException; diff --git a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV1.java b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV1.java index 5cfc36969b..73d2a3cf78 100644 --- a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV1.java +++ b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV1.java @@ -119,7 +119,7 @@ public void handleCpuLimits(GreengrassService component, double cpu) throws IOEx } @Override - public void pauseComponentProcessesCore(GreengrassService component, List processes) + public void pauseComponentProcessesCore(GreengrassService component) throws IOException { if (LinuxSystemResourceController.CgroupFreezerState.FROZEN.equals( currentFreezerCgroupState(component.getServiceName()))) { diff --git a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV2.java b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV2.java index 7a24cf3197..d1efd2872b 100644 --- a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV2.java +++ b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/CGroupV2.java @@ -14,7 +14,6 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; -import java.util.List; import java.util.Set; @SuppressFBWarnings(value = "DMI_HARDCODED_ABSOLUTE_FILENAME", @@ -114,7 +113,7 @@ public void handleCpuLimits(GreengrassService component, double cpu) throws IOEx } @Override - public void pauseComponentProcessesCore(GreengrassService component, List processes) + public void pauseComponentProcessesCore(GreengrassService component) throws IOException { Files.write(getCgroupFreezerStateFilePath(component.getServiceName()), String.valueOf(CgroupV2FreezerState.FROZEN.getIndex()).getBytes(StandardCharsets.UTF_8), diff --git a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/LinuxSystemResourceController.java b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/LinuxSystemResourceController.java index e2317b4073..3252a58827 100644 --- a/src/main/java/com/aws/greengrass/util/platforms/unix/linux/LinuxSystemResourceController.java +++ b/src/main/java/com/aws/greengrass/util/platforms/unix/linux/LinuxSystemResourceController.java @@ -169,7 +169,7 @@ public void addComponentProcess(GreengrassService component, Process process) { @Override public void pauseComponentProcesses(GreengrassService component, List processes) throws IOException { prePauseComponentProcesses(component, processes); - freezerCgroup.pauseComponentProcessesCore(component, processes); + freezerCgroup.pauseComponentProcessesCore(component); }