[ 
https://issues.apache.org/jira/browse/GRIFFIN-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Borgatin updated GRIFFIN-232:
---------------------------------------
    Description: 
I propose add second type of predicate after "file.exist"  - "custom". JSON 
example for creation "custom" predicate
{code:java}
                     {
                         "type": "custom",
                         "config": {
                           "class": 
"org.apache.griffin.core.job.FileExistPredicator",
                           "root.path": "/path/to/",
                           "path": "file.ext,file2.txt"
                         }
                     }
{code}
Proposed contract for implementations is based on FileExistPredicator:
 * class must implement interface *org.apache.griffin.core.job.Predicator*
 * class must have constructor with argument of type 
*org.apache.griffin.core.job.entity.SegmentPredicate*

  was:
I propose 
 # add property predicates to application.properties

{code:java}
predicates={'file.exist':'org.apache.griffin.core.job.FileExistPredicator'}{code}
 # change PredicatorFactory for reading values from property predicates, 
loading class and creating instance of Predicate


> Implement pluggable Predicators in PredicatorFactory
> ----------------------------------------------------
>
>                 Key: GRIFFIN-232
>                 URL: https://issues.apache.org/jira/browse/GRIFFIN-232
>             Project: Griffin (Incubating)
>          Issue Type: Improvement
>            Reporter: Aleksandr Borgatin
>            Priority: Minor
>
> I propose add second type of predicate after "file.exist"  - "custom". JSON 
> example for creation "custom" predicate
> {code:java}
>                      {
>                          "type": "custom",
>                          "config": {
>                            "class": 
> "org.apache.griffin.core.job.FileExistPredicator",
>                            "root.path": "/path/to/",
>                            "path": "file.ext,file2.txt"
>                          }
>                      }
> {code}
> Proposed contract for implementations is based on FileExistPredicator:
>  * class must implement interface *org.apache.griffin.core.job.Predicator*
>  * class must have constructor with argument of type 
> *org.apache.griffin.core.job.entity.SegmentPredicate*



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to