use of com.sequenceiq.cloudbreak.orchestrator.yarn.model.request.DeleteApplicationRequest in project cloudbreak by hortonworks.
the class YarnContainerOrchestrator method deleteContainer.
@Override
public void deleteContainer(List<ContainerInfo> containerInfo, OrchestrationCredential cred) throws CloudbreakOrchestratorException {
for (ContainerInfo container : containerInfo) {
DeleteApplicationRequest deleteApplicationRequest = new DeleteApplicationRequest();
deleteApplicationRequest.setName(container.getName());
YarnClient yarnHttpClient = new YarnHttpClient(cred.getApiEndpoint());
try {
yarnHttpClient.deleteApplication(deleteApplicationRequest);
} catch (Exception e) {
throw new CloudbreakOrchestratorFailedException(e.getMessage(), e);
}
}
}
Aggregations