@Alpha public class StaticFlowTemplate extends Object implements FlowTemplate
FlowTemplate using a static Config as the raw configuration for the template.| Constructor and Description |
|---|
StaticFlowTemplate(URI flowTemplateDirUri,
String version,
String description,
com.typesafe.config.Config config,
FlowCatalogWithTemplates catalog) |
StaticFlowTemplate(URI uri,
String version,
String description,
com.typesafe.config.Config config,
FlowCatalogWithTemplates catalog,
List<JobTemplate> jobTemplates) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.commons.lang3.tuple.Pair<DatasetDescriptor,DatasetDescriptor>> |
getDatasetDescriptors(com.typesafe.config.Config userConfig,
boolean resolvable)
Generate the input/output dataset descriptors for the
FlowTemplate. |
List<JobTemplate> |
getJobTemplates() |
com.typesafe.config.Config |
getRawTemplateConfig() |
List<com.typesafe.config.Config> |
getResolvedJobConfigs(com.typesafe.config.Config userConfig,
DatasetDescriptor inputDescriptor,
DatasetDescriptor outputDescriptor)
|
void |
tryResolving(com.typesafe.config.Config userConfig,
DatasetDescriptor inputDescriptor,
DatasetDescriptor outputDescriptor)
Try to resolve the
FlowTemplate using the provided Config object. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getUri, getVersionpublic StaticFlowTemplate(URI flowTemplateDirUri, String version, String description, com.typesafe.config.Config config, FlowCatalogWithTemplates catalog) throws IOException, SpecNotFoundException, JobTemplate.TemplateException, URISyntaxException
public StaticFlowTemplate(URI uri, String version, String description, com.typesafe.config.Config config, FlowCatalogWithTemplates catalog, List<JobTemplate> jobTemplates)
public List<org.apache.commons.lang3.tuple.Pair<DatasetDescriptor,DatasetDescriptor>> getDatasetDescriptors(com.typesafe.config.Config userConfig, boolean resolvable) throws IOException
FlowTemplate.getDatasetDescriptors in interface FlowTemplateuserConfig - User supplied Configresolvable - Whether to return only resolvable dataset descriptorsFlowTemplate. If resolvable is true,
only return descriptors that fully resolve it.IOExceptionpublic com.typesafe.config.Config getRawTemplateConfig()
getRawTemplateConfig in interface FlowTemplatepublic List<JobTemplate> getJobTemplates()
getJobTemplates in interface FlowTemplateCollection of JobTemplates that belong to this FlowTemplate.public void tryResolving(com.typesafe.config.Config userConfig,
DatasetDescriptor inputDescriptor,
DatasetDescriptor outputDescriptor)
throws SpecNotFoundException,
JobTemplate.TemplateException
FlowTemplate using the provided Config object. A FlowTemplate
is resolvable only if each of the JobTemplates in the flow is resolvable. Throws an exception if the flow is
not resolvable.tryResolving in interface FlowTemplateuserConfig - User supplied ConfiginputDescriptor - input DatasetDescriptoroutputDescriptor - output DatasetDescriptorSpecNotFoundExceptionJobTemplate.TemplateExceptionpublic List<com.typesafe.config.Config> getResolvedJobConfigs(com.typesafe.config.Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor) throws SpecNotFoundException, JobTemplate.TemplateException
FlowTemplategetResolvedJobConfigs in interface FlowTemplateuserConfig - User supplied ConfiginputDescriptor - input DatasetDescriptoroutputDescriptor - output DatasetDescriptorConfigs.SpecNotFoundExceptionJobTemplate.TemplateException