#About predicates
##Overview The purpose of predicates is obligate Griffin to check certain conditions before starting SparkSubmitJob. Depending on these conditions Griffin need to start or not start the measurement.
##Configure predicates
For configuring predicates need add property to measure json:
{ ... "data.sources": [ ... "connectors": [ "predicates": [ { "type": "file.exist", "config": { "root.path": "/path/to/", "path": "file.ext,file2.txt" } } ], ... ] }
Possible values for predicates.type:
{ "type": "file.exist", "config": { "root.path": "/path/to/", "path": "file.ext,file2.txt" } }
{ "type": "custom", "config": { "class": "org.apache.griffin.core.job.FileExistPredicator", "root.path": "/path/to/", "path": "file.ext,file2.txt" } }
It important to notice that predicate class must satisfy follow conditions:
##Deployment custom predicates For the creating custom predicate you need
<dependency> <groupId>org.apache.griffin</groupId> <artifactId>service</artifactId> <classifier>lib</classifier> <version>${griffin.version}</version> <scope>provided</scope> </dependency>
java -cp target/service-VERSION.jar -Dloader.path=/path-to-jar/ org.springframework.boot.loader.PropertiesLauncher