use of com.epam.pipeline.entity.metadata.FireCloudClass in project cloud-pipeline by epam.
the class MetadataEntityConverter method convert.
public static Map<String, String> convert(List<MetadataEntity> entities) {
Map<FireCloudClass, FireCloudData> content = new EnumMap<>(FireCloudClass.class);
entities.forEach(entity -> {
FireCloudClass fireCloudClass = entity.getClassEntity().getFireCloudClassName();
Assert.notNull(fireCloudClass, "Fire Cloud class must be specified.");
FireCloudData dataContent = content.computeIfAbsent(fireCloudClass, key -> new FireCloudData(fireCloudClass, entity.getData()));
dataContent.put(entity);
});
Map<String, String> result = new HashMap<>();
content.forEach(((fireCloudClass, fireCloudData) -> {
result.put(fireCloudClass.getFileName(), fireCloudData.getContent());
if (fireCloudData.isSet()) {
result.put(fireCloudClass.getMembershipFileName(), fireCloudData.getMembershipContent());
}
}));
return result;
}
use of com.epam.pipeline.entity.metadata.FireCloudClass in project cloud-pipeline by epam.
the class FirecloudRunner method runFirecloudAnalysis.
private PipelineRun runFirecloudAnalysis(FirecloudConfiguration settings, FirecloudRunConfigurationEntry entry, Long configurationId, List<Long> entities, Long projectId) {
FireCloudClass rootEntityType = metadataEntityManager.loadClass(entry.getRootEntityId()).getFireCloudClassName();
PipelineStart startVO = createFirecloudStart(settings, entry, entities, projectId, configurationId, rootEntityType);
PipelineConfiguration runConfiguration = pipelineConfigurationManager.getPipelineConfiguration(startVO);
runConfiguration.setExecutionPreferences(FirecloudPreferences.builder().method(entry.getMethodName()).methodSnapshot(entry.getMethodSnapshot()).methodConfiguration(entry.getMethodConfigurationName()).methodConfigurationSnapshot(entry.getMethodSnapshot()).build());
addCredentials(runConfiguration, settings);
return pipelineRunManager.launchPipeline(runConfiguration, null, null, startVO.getInstanceType(), startVO.getParentNodeId(), startVO.getConfigurationName(), null, null, entities, configurationId, startVO.getRunSids());
}
Aggregations