Github user RalphSu commented on a diff in the pull request:

    https://github.com/apache/incubator-eagle/pull/71#discussion_r51575914
  
    --- Diff: 
eagle-core/eagle-policy/eagle-policy-base/src/main/java/org/apache/eagle/policy/dao/AlertDefinitionDAOImpl.java
 ---
    @@ -83,4 +85,27 @@ public AlertDefinitionDAOImpl(EagleServiceConnector 
connector){
                        }
                return map;
        }
    +
    +   @Override
    +   public void updatePolicyDetails(AlertDefinitionAPIEntity entity, 
boolean markdownEnabled, String markdownReason) {
    +           IEagleServiceClient client = new 
EagleServiceClientImpl(connector);
    +
    +           List<AlertDefinitionAPIEntity> entityList = new ArrayList<>();
    +           entity.setMarkdownReason(null != markdownReason ? 
markdownReason : "");
    +           entity.setMarkdownEnabled(markdownEnabled);
    +           entityList.add(entity);
    +
    +           try {
    +                   client.create(entityList, 
Constants.ALERT_DEFINITION_SERVICE_ENDPOINT_NAME);
    +           } catch (IOException | EagleServiceClientException exception) {
    +                   LOG.error("Exception in updating markdown for policy in 
HBase", exception.getMessage());
    --- End diff --
    
    Please make sure not only the message is logged, but also the stack, you 
might want to pass the exception object to LOG here. 


---
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