brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Support for deployment to Windows
Date Tue, 19 May 2015 16:04:14 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/650#discussion_r30615433
  
    --- Diff: core/src/main/java/brooklyn/event/feed/windows/WindowsPerformanceCounterFeed.java
---
    @@ -251,10 +258,71 @@ public T call() throws Exception {
             }
         }
     
    +    private static class SendPerfCountersToSensors implements PollHandler<WinRmToolResponse>
{
    +
    +        private final EntityLocal entity;
    +        private final List<WindowsPerformanceCounterPollConfig<?>> polls;
    +
    +        public SendPerfCountersToSensors(EntityLocal entity, List<WindowsPerformanceCounterPollConfig<?>>
polls) {
    +            this.entity = entity;
    +            this.polls = polls;
    +        }
    +
    +        @Override
    +        public boolean checkSuccess(WinRmToolResponse val) {
    +            if (val.getStatusCode() != 0) return false;
    +            String stderr = val.getStdErr();
    +            if (stderr == null || stderr.length() != 0) return false;
    --- End diff --
    
    Can we not just rely on the statusCode?
    Worth a TODO to explain why treating presence of stderr as a failure.


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