Github user yonzhang commented on the pull request:

    https://github.com/apache/incubator-eagle/pull/71#issuecomment-175999816
  
    @murkrishn @senthilec566 I suggest a different solution. 
    1. define a new interface in PolicyEvaluator called isMarkedDown()
    2. It is PolicyEvaluator implementation's responsibility to determine if 
the policy is marked down or not. In our case, SiddhiPolicyEvaluator and 
MLPolicyEvaluator should implement this above interface
    3. It is PolicyEvaluator implementation's responsibility to determine if 
the policy should be marked down based on parsing for Siddhi case. For 
SiddhiPolicyEvaluator, we can catch exception from createSiddhiRuntime method, 
then markdown this policy by setting one field(markedDown) to be true. That can 
be in SiddhiPolicyEvaluator constructor method and onPolicyUpdate method
    4. It is PolicyProcessExecutor's responsibility to report markdown status 
back to eagle service. So probably we can check PolicyEvaluator's isMarkedDown 
after policy creation or update, and then write back to eagle service.
    Please suggest if that will do well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to