stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishanth <...@git.apache.org>
Subject [GitHub] stratos pull request: Added exception for persisting autoscaler po...
Date Wed, 08 Apr 2015 04:42:47 GMT
Github user Vishanth commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/261#discussion_r27942541
  
    --- Diff: components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java
---
    @@ -117,11 +117,17 @@ private void persist(Object dataObj, String resourcePath) throws
AutoScalerExcep
         }
     
         public void persistAutoscalerPolicy(AutoscalePolicy autoscalePolicy) {
    -        String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE + AutoscalerConstants.AS_POLICY_RESOURCE
+ "/" + autoscalePolicy.getId();
    -        persist(autoscalePolicy, resourcePath);
    -        if (log.isDebugEnabled()) {
    -            log.debug(String.format("Autoscaler policy written to registry: [id] %s [name]
%s [description] %s",
    -                    autoscalePolicy.getId(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription()));
    +        try {
    +            String resourcePath = AutoscalerConstants.AUTOSCALER_RESOURCE +
    +                    AutoscalerConstants.AS_POLICY_RESOURCE + "/" + autoscalePolicy.getId();
    +            persist(autoscalePolicy, resourcePath);
    +            if (log.isDebugEnabled()) {
    +                log.debug(String.format("Autoscaler policy written to registry: [id]
%s [name] %s [description] %s",
    +                        autoscalePolicy.getId(), autoscalePolicy.getDisplayName(), autoscalePolicy.getDescription()));
    +            }
    +        } catch (Exception e) {
    --- End diff --
    
    Noted. Will do.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message