public class SimpleInstallationFinder extends java.lang.Object implements InstallationFinder
InstallationFinder.
Assumes that one or more Samza jobs are contained in each sub directory of the provided installationsPath.
Each sub directory is also expected to contian a bin directory and a config directory containing one or
more job config files.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
BIN_SUBPATH |
protected static java.lang.String |
CFG_SUBPATH |
protected java.lang.String |
installationsPath |
protected org.apache.samza.config.ConfigFactory |
jobConfigFactory |
| Constructor and Description |
|---|
SimpleInstallationFinder(java.lang.String installationsPath,
org.apache.samza.config.ConfigFactory jobConfigFactory)
Required constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<JobInstance,InstallationRecord> |
getAllInstalledJobs() |
boolean |
isInstalled(JobInstance jobInstance) |
protected static final java.lang.String BIN_SUBPATH
protected static final java.lang.String CFG_SUBPATH
protected final java.lang.String installationsPath
protected final org.apache.samza.config.ConfigFactory jobConfigFactory
public SimpleInstallationFinder(java.lang.String installationsPath,
org.apache.samza.config.ConfigFactory jobConfigFactory)
installationsPath - the root path where all Samza jobs are installed.jobConfigFactory - the ConfigFactory to use to read the job configs.public boolean isInstalled(JobInstance jobInstance)
isInstalled in interface InstallationFinderjobInstance - the job to check.true if a job with the specified name and id is installed on the local host.public java.util.Map<JobInstance,InstallationRecord> getAllInstalledJobs()
getAllInstalledJobs in interface InstallationFinderJobInstance to the corresponding InstallationRecord
for each Samza installation found in the installRoot.