YARN-8791. Trim docker inspect output for line feed for STOPSIGNAL parsing.

Contributed by Chandni Singh
This commit is contained in:
Eric Yang 2018-09-19 13:16:11 -04:00
parent 1824d5d1c4
commit efdea85ad1
1 changed files with 1 additions and 1 deletions

View File

@ -1282,7 +1282,7 @@ public class DockerLinuxContainerRuntime implements LinuxContainerRuntime {
DockerInspectCommand.STATUS_TEMPLATE, DockerInspectCommand.STATUS_TEMPLATE,
DockerInspectCommand.STOPSIGNAL_TEMPLATE}, delimiter); DockerInspectCommand.STOPSIGNAL_TEMPLATE}, delimiter);
try { try {
String output = executeDockerInspect(containerId, inspectCommand); String output = executeDockerInspect(containerId, inspectCommand).trim();
if (!output.isEmpty()) { if (!output.isEmpty()) {
String[] statusAndSignal = StringUtils.split(output, delimiter); String[] statusAndSignal = StringUtils.split(output, delimiter);