Search in sources :

Example 6 with FileSystem

use of com.sequenceiq.cloudbreak.domain.FileSystem in project cloudbreak by hortonworks.

the class FileSystemRequestToFileSystemConverter method convert.

@Override
public FileSystem convert(FileSystemRequest source) {
    FileSystem fs = new FileSystem();
    fs.setName(source.getName());
    fs.setType(source.getType().name());
    fs.setDefaultFs(source.isDefaultFs());
    if (source.getProperties() != null) {
        fs.setProperties(source.getProperties());
    } else {
        fs.setProperties(new HashMap<>());
    }
    return fs;
}
Also used : FileSystem(com.sequenceiq.cloudbreak.domain.FileSystem)

Example 7 with FileSystem

use of com.sequenceiq.cloudbreak.domain.FileSystem in project cloudbreak by hortonworks.

the class ClusterTerminationService method finalizeClusterTermination.

public void finalizeClusterTermination(Long clusterId) {
    Cluster cluster = clusterRepository.findById(clusterId);
    Set<RDSConfig> rdsConfigs = cluster.getRdsConfigs();
    Long stackId = cluster.getStack().getId();
    String terminatedName = cluster.getName() + DELIMITER + new Date().getTime();
    cluster.setName(terminatedName);
    FileSystem fs = cluster.getFileSystem();
    if (fs != null) {
        deleteFileSystemResources(stackId, fs);
    }
    cluster.setBlueprint(null);
    cluster.setStack(null);
    cluster.setLdapConfig(null);
    cluster.setRdsConfigs(new HashSet<>());
    cluster.setProxyConfig(null);
    cluster.setStatus(DELETE_COMPLETED);
    deleteClusterHostGroupsWithItsMetadata(cluster);
    rdsConfigService.deleteDefaultRdsConfigs(rdsConfigs);
    componentConfigProvider.deleteComponentsForStack(stackId);
}
Also used : RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) FileSystem(com.sequenceiq.cloudbreak.domain.FileSystem) Cluster(com.sequenceiq.cloudbreak.domain.Cluster) JsonUtil.writeValueAsString(com.sequenceiq.cloudbreak.util.JsonUtil.writeValueAsString) Date(java.util.Date)

Aggregations

FileSystem (com.sequenceiq.cloudbreak.domain.FileSystem)7 Cluster (com.sequenceiq.cloudbreak.domain.Cluster)5 FileSystemConfigurationView (com.sequenceiq.cloudbreak.blueprint.template.views.FileSystemConfigurationView)2 KerberosConfig (com.sequenceiq.cloudbreak.domain.KerberosConfig)2 IOException (java.io.IOException)2 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 BlueprintInputJson (com.sequenceiq.cloudbreak.api.model.BlueprintInputJson)1 FileSystemBase (com.sequenceiq.cloudbreak.api.model.FileSystemBase)1 FileSystemConfiguration (com.sequenceiq.cloudbreak.api.model.FileSystemConfiguration)1 FileSystemRequest (com.sequenceiq.cloudbreak.api.model.FileSystemRequest)1 GatewayJson (com.sequenceiq.cloudbreak.api.model.GatewayJson)1 KerberosRequest (com.sequenceiq.cloudbreak.api.model.KerberosRequest)1 BlueprintProcessingException (com.sequenceiq.cloudbreak.blueprint.BlueprintProcessingException)1 HdfConfigs (com.sequenceiq.cloudbreak.blueprint.nifi.HdfConfigs)1 BlueprintView (com.sequenceiq.cloudbreak.blueprint.template.views.BlueprintView)1 BlueprintStackInfo (com.sequenceiq.cloudbreak.blueprint.templates.BlueprintStackInfo)1 StackRepoDetails (com.sequenceiq.cloudbreak.cloud.model.component.StackRepoDetails)1 IdentityUser (com.sequenceiq.cloudbreak.common.model.user.IdentityUser)1 LdapConfig (com.sequenceiq.cloudbreak.domain.LdapConfig)1 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)1