/** * Format string when memory limit has been exceeded. * @param memTypeExceeded type of memory * @param usageString general memory usage information string * @param pId process id * @param containerId container id * @param pTree process tree to dump full resource utilization graph * @return formatted resource usage information */ private String formatErrorMessage(String memTypeExceeded, String usageString, String pId, ContainerId containerId, ResourceCalculatorProcessTree pTree, long delta) { return String.format("Container [pid=%s,containerID=%s] is " + "running %dB beyond the '%S' memory limit. ", pId, containerId, delta, memTypeExceeded) + "Current usage: " + usageString + ". Killing container.\n" + "Dump of the process-tree for " + containerId + " :\n" + pTree.getProcessTreeDump(); }
private String formatErrorMessage(String memTypeExceeded, long currentVmemUsage, long vmemLimit, long currentPmemUsage, long pmemLimit, String pId, ContainerId containerId, ResourceCalculatorProcessTree pTree) { return String.format("Container [pid=%s,containerID=%s] is running beyond %s memory limits. ", pId, containerId, memTypeExceeded) + "Current usage: " + formatUsageString(currentVmemUsage, vmemLimit, currentPmemUsage, pmemLimit) + ". Killing container.\n" + "Dump of the process-tree for " + containerId + " :\n" + pTree.getProcessTreeDump(); }
private String formatErrorMessage(String memTypeExceeded, long currentVmemUsage, long vmemLimit, long currentPmemUsage, long pmemLimit, String pId, ContainerId containerId, ResourceCalculatorProcessTree pTree) { return String.format("Container [pid=%s,containerID=%s] is running beyond %s memory limits. ", pId, containerId, memTypeExceeded) + "Current usage: " + formatUsageString(currentVmemUsage, vmemLimit, currentPmemUsage, pmemLimit) + ". Killing container.\n" + "Dump of the process-tree for " + containerId + " :\n" + pTree.getProcessTreeDump(); }
private String formatErrorMessage(String memTypeExceeded, long currentVmemUsage, long vmemLimit, long currentPmemUsage, long pmemLimit, String pId, ContainerId containerId, ResourceCalculatorProcessTree pTree) { return String.format("Container [pid=%s,containerID=%s] is running beyond %s memory limits. ", pId, containerId, memTypeExceeded) + "Current usage: " + formatUsageString(currentVmemUsage, vmemLimit, currentPmemUsage, pmemLimit) + ". Killing container.\n" + "Dump of the process-tree for " + containerId + " :\n" + pTree.getProcessTreeDump(); }