public class ObservingFSFlowEdgeTemplateCatalog extends FSFlowTemplateCatalog
FSFlowTemplateCatalog that keeps a cache of flow and job templates. It has a
PathAlterationListener on the root path, and clears the cache when a change
is detected so that the next call to getFlowTemplate(URI) will use the updated files.ImmutableFSJobCatalog.ConfigAccessor, ImmutableFSJobCatalog.JobSpecConverterMutableJobCatalog.MutableStandardMetricsJobCatalog.StandardMetricsFLOW_CONF_FILE_NAME, FS_SCHEME, JOB_FILE_EXTENSIONS, JOBS_DIR_NAMECONF_EXTENSION, mutableMetricsDESCRIPTION_KEY_IN_JOBSPEC, fs, FS_CATALOG_KEY_PREFIX, jobConfDirPath, loader, pathAlterationDetector, sysConfig, VERSION_KEY_IN_JOBSPEClisteners, log, metricContext, metrics| Constructor and Description |
|---|
ObservingFSFlowEdgeTemplateCatalog(com.typesafe.config.Config sysConfig,
ReadWriteLock rwLock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndSetShouldRefreshFlowGraph(boolean value) |
FlowTemplate |
getFlowTemplate(URI flowTemplateDirURI)
Get
FlowTemplate with given URI. |
List<JobTemplate> |
getJobTemplatesForFlow(URI flowTemplateDirURI) |
protected org.apache.gobblin.util.filesystem.PathAlterationListener |
getListener() |
protected void |
startUp() |
createStandardMetrics, getAllTemplates, getInjectedExtension, getPathForURI, getTemplate, put, remove, shouldLoadGlobalConfgetJobs, getJobSpec, getJobSpecIterator, shutDownaddListener, 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 ObservingFSFlowEdgeTemplateCatalog(com.typesafe.config.Config sysConfig,
ReadWriteLock rwLock)
throws IOException
IOExceptionpublic FlowTemplate getFlowTemplate(URI flowTemplateDirURI) throws SpecNotFoundException, JobTemplate.TemplateException, IOException, URISyntaxException
FlowCatalogWithTemplatesFlowTemplate with given URI.getFlowTemplate in interface FlowCatalogWithTemplatesgetFlowTemplate in class FSFlowTemplateCatalogflowTemplateDirURI - URI of the flow template directoryFlowTemplateSpecNotFoundException - if a JobTemplate with given URI cannot be found.JobTemplate.TemplateExceptionIOExceptionURISyntaxExceptionpublic List<JobTemplate> getJobTemplatesForFlow(URI flowTemplateDirURI) throws IOException, SpecNotFoundException, JobTemplate.TemplateException, URISyntaxException
getJobTemplatesForFlow in interface FlowCatalogWithTemplatesgetJobTemplatesForFlow in class FSFlowTemplateCatalogflowTemplateDirURI - Relative URI of the flow template directoryJobTemplates for a given flow identified by its URI.IOExceptionSpecNotFoundExceptionJobTemplate.TemplateExceptionURISyntaxExceptionprotected org.apache.gobblin.util.filesystem.PathAlterationListener getListener()
getListener in class ImmutableFSJobCatalogprotected void startUp()
throws IOException
startUp in class ImmutableFSJobCatalogIOExceptionpublic boolean getAndSetShouldRefreshFlowGraph(boolean value)
getAndSetShouldRefreshFlowGraph in class FSFlowTemplateCatalog