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;
}
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);
}
Aggregations