Search in sources :

Example 6 with EnvironmentClient

use of com.sequenceiq.environment.client.EnvironmentClient in project cloudbreak by hortonworks.

the class CleanupUtil method cleanupSdxes.

public void cleanupSdxes() {
    SdxClient sdxClient = createSdxClient();
    EnvironmentClient environmentClient = createEnvironmentClient();
    List<String> foundSdxNames = getSdxes(environmentClient, sdxClient);
    setSdxClient(sdxClient);
    LOG.info("Found data lakes (sdxes): '{}'", foundSdxNames);
    if (!foundSdxNames.isEmpty()) {
        deleteResources(foundSdxNames, "sdxName");
    } else {
        LOG.info("Cannot find any sdx");
    }
}
Also used : EnvironmentClient(com.sequenceiq.environment.client.EnvironmentClient) SdxClient(com.sequenceiq.sdx.client.SdxClient)

Aggregations

EnvironmentClient (com.sequenceiq.environment.client.EnvironmentClient)6 CloudbreakClient (com.sequenceiq.cloudbreak.client.CloudbreakClient)2 SdxClient (com.sequenceiq.sdx.client.SdxClient)2 ArrayList (java.util.ArrayList)2 Status (com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status)1 StackViewV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.StackViewV4Response)1 EnvironmentBaseResponse (com.sequenceiq.environment.api.v1.environment.model.response.EnvironmentBaseResponse)1 EnvironmentStatus (com.sequenceiq.environment.api.v1.environment.model.response.EnvironmentStatus)1 WaitResult (com.sequenceiq.it.cloudbreak.util.WaitResult)1 SdxClusterResponse (com.sequenceiq.sdx.api.model.SdxClusterResponse)1 SdxClusterStatusResponse (com.sequenceiq.sdx.api.model.SdxClusterStatusResponse)1 Collections (java.util.Collections)1 Map (java.util.Map)1 Collectors (java.util.stream.Collectors)1 Logger (org.slf4j.Logger)1 LoggerFactory (org.slf4j.LoggerFactory)1 Value (org.springframework.beans.factory.annotation.Value)1 Component (org.springframework.stereotype.Component)1