public final class DockerCommandExecutor extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DockerCommandExecutor.DockerContainerStatus
Potential states that the docker status can return.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
executeDockerCommand(DockerCommand dockerCommand,
String containerId,
Map<String,String> env,
org.apache.hadoop.conf.Configuration conf,
PrivilegedOperationExecutor privilegedOperationExecutor,
boolean disableFailureLogging)
Execute a docker command and return the output.
|
static DockerCommandExecutor.DockerContainerStatus |
getContainerStatus(String containerId,
org.apache.hadoop.conf.Configuration conf,
PrivilegedOperationExecutor privilegedOperationExecutor)
Get the status of the docker container.
|
public static String executeDockerCommand(DockerCommand dockerCommand, String containerId, Map<String,String> env, org.apache.hadoop.conf.Configuration conf, PrivilegedOperationExecutor privilegedOperationExecutor, boolean disableFailureLogging) throws ContainerExecutionException
dockerCommand - the docker command to run.containerId - the id of the container.env - environment for the container.conf - the hadoop configuration.privilegedOperationExecutor - the privileged operations executor.disableFailureLogging - disable logging for known rc failures.ContainerExecutionException - if the operation fails.public static DockerCommandExecutor.DockerContainerStatus getContainerStatus(String containerId, org.apache.hadoop.conf.Configuration conf, PrivilegedOperationExecutor privilegedOperationExecutor)
containerId - the id of the container.conf - the hadoop configuration.privilegedOperationExecutor - the privileged operations executor.DockerCommandExecutor.DockerContainerStatus representing the current status.Copyright © 2022 Apache Software Foundation. All rights reserved.