@Alpha public class FSFlowTemplateCatalog extends FSJobCatalog implements FlowCatalogWithTemplates
FlowTemplates. Provides basic API for retrieving a FlowTemplate
from the catalog and for retrieving JobTemplates that are part of a FlowTemplate.
The flow and job configuration files are assumed to have the following path structure:
/path/to/template/catalog/flowName/flow.conf
/path/to/template/catalog/flowName/jobs/job1.(job|template)
/path/to/template/catalog/flowName/jobs/job2.(job|template)
Avoid confusing withFlowCatalog which is a catalog for
FlowSpec.
Note that any exceptions thrown here should be propagated into called level for handling, since the handling
of exceptions while loading/resolving template is subject to caller logic.ImmutableFSJobCatalog.ConfigAccessor, ImmutableFSJobCatalog.JobSpecConverterMutableJobCatalog.MutableStandardMetricsJobCatalog.StandardMetrics| Modifier and Type | Field and Description |
|---|---|
static String |
FLOW_CONF_FILE_NAME |
protected static String |
FS_SCHEME |
static List<String> |
JOB_FILE_EXTENSIONS |
static String |
JOBS_DIR_NAME |
CONF_EXTENSION, mutableMetricsDESCRIPTION_KEY_IN_JOBSPEC, fs, FS_CATALOG_KEY_PREFIX, jobConfDirPath, loader, pathAlterationDetector, sysConfig, VERSION_KEY_IN_JOBSPEClisteners, log, metricContext, metrics| Constructor and Description |
|---|
FSFlowTemplateCatalog(com.typesafe.config.Config sysConfig)
Initialize the FlowCatalog
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndSetShouldRefreshFlowGraph(boolean value) |
FlowTemplate |
getFlowTemplate(URI flowTemplateDirURI)
Get
FlowTemplate with given URI. |
List<JobTemplate> |
getJobTemplatesForFlow(URI flowTemplateDirURI) |
createStandardMetrics, getAllTemplates, getInjectedExtension, getPathForURI, getTemplate, put, remove, shouldLoadGlobalConfgetJobs, getJobSpec, getJobSpecIterator, getListener, shutDown, startUpaddListener, generateTags, getMetricContext, getMetrics, isInstrumentationEnabled, notifyAllListeners, registerWeakJobCatalogListener, removeListener, switchMetricContext, switchMetricContextaddListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, start, startAndWait, startAsync, state, stop, stopAndWait, stopAsync, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetJobs, getJobSpec, getJobSpecIterator, getMetrics, getStandardMetricsCollectionaddListener, registerWeakJobCatalogListener, removeListenergenerateTags, getMetricContext, isInstrumentationEnabled, switchMetricContext, switchMetricContextpublic static final String JOBS_DIR_NAME
public static final String FLOW_CONF_FILE_NAME
protected static final String FS_SCHEME
public FSFlowTemplateCatalog(com.typesafe.config.Config sysConfig)
throws IOException
sysConfig - that must contain the fully qualified path of the flow template catalogIOExceptionpublic FlowTemplate getFlowTemplate(URI flowTemplateDirURI) throws SpecNotFoundException, JobTemplate.TemplateException, IOException, URISyntaxException
FlowCatalogWithTemplatesFlowTemplate with given URI.getFlowTemplate in interface FlowCatalogWithTemplatesflowTemplateDirURI - URI of the flow template directoryFlowTemplateSpecNotFoundExceptionJobTemplate.TemplateExceptionIOExceptionURISyntaxExceptionpublic List<JobTemplate> getJobTemplatesForFlow(URI flowTemplateDirURI) throws IOException, SpecNotFoundException, JobTemplate.TemplateException, URISyntaxException
getJobTemplatesForFlow in interface FlowCatalogWithTemplatesflowTemplateDirURI - Relative URI of the flow template directoryJobTemplates for a given flow identified by its URI.IOExceptionSpecNotFoundExceptionJobTemplate.TemplateExceptionURISyntaxExceptionpublic boolean getAndSetShouldRefreshFlowGraph(boolean value)