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

View File

@ -1282,7 +1282,7 @@ private void handleContainerStop(ContainerId containerId,
DockerInspectCommand.STATUS_TEMPLATE,
DockerInspectCommand.STOPSIGNAL_TEMPLATE}, delimiter);
try {
String output = executeDockerInspect(containerId, inspectCommand);
String output = executeDockerInspect(containerId, inspectCommand).trim();
if (!output.isEmpty()) {
String[] statusAndSignal = StringUtils.split(output, delimiter);