You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by bostko <gi...@git.apache.org> on 2015/03/23 18:37:53 UTC

[GitHub] incubator-brooklyn pull request: Riak - More statistics

GitHub user bostko opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/565

    Riak - More statistics

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bostko/incubator-brooklyn riak-packagecloud

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/565.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #565
    
----
commit 7e4b9f2c13c529a6f00225b8214938dda446fb4a
Author: Valentin Aitken <bo...@gmail.com>
Date:   2015-03-20T17:18:46Z

    Riak Linux - add flag for turning off sysctl optimizations

commit 4dbfdd6f24bf6f90dfdf25a22898c661e57cb35c
Author: Valentin Aitken <bo...@gmail.com>
Date:   2015-03-23T17:25:52Z

    Riak Linux - add more sensors

----


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26973771
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    +    AttributeSensor<String> SEARCH_INDEX_LATENCY_MEDIAN = Sensors.newStringSensor("search_index_latency_median", "Time it takes Search to index a new document");
    +    AttributeSensor<String> CONSISTENT_GET_TIME_MEAN = Sensors.newStringSensor("consistent_get_time_mean", "Strongly consistent read latency");
    +    AttributeSensor<String> CONSISTENT_PUT_TIME_MEAN = Sensors.newStringSensor("consistent_put_time_mean", "Strongly consistent write latency");
    +
    +    List<AttributeSensor<String>> ONE_MINUTE_STRING_SENSORS = ImmutableList.of(NODE_GET_FSM_TIME_MEAN, NODE_PUT_FSM_TIME_MEAN,
    +            OBJECT_COUNTER_MERGE_TIME_MEAN, OBJECT_SET_MERGE_TIME_MEAN, OBJECT_MAP_MERGE_TIME_MEAN,
    +            SEARCH_QUERY_LATENCY_MEDIAN, SEARCH_INDEX_LATENCY_MEDIAN,
    +            CONSISTENT_GET_TIME_MEAN, CONSISTENT_PUT_TIME_MEAN);
    +
    +    ConfigKey<Boolean> DO_OS_TUNING = new BasicConfigKey<Boolean>(
    --- End diff --
    
    Use `ConfigKeys.newBooleanConfigKey` here, although this seems to be a duplicate of https://github.com/apache/incubator-brooklyn/blob/master/software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java#L49-L50 from #563


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85200409
  
    @bostko yes, that looks good now, am happy to merge now


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26996027
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -29,12 +29,10 @@
     import brooklyn.entity.basic.SoftwareProcess;
     import brooklyn.entity.proxying.ImplementedBy;
     import brooklyn.event.AttributeSensor;
    -import brooklyn.event.basic.AttributeSensorAndConfigKey;
    -import brooklyn.event.basic.PortAttributeSensorAndConfigKey;
    -import brooklyn.event.basic.Sensors;
    -import brooklyn.event.basic.TemplatedStringAttributeSensorAndConfigKey;
    +import brooklyn.event.basic.*;
    --- End diff --
    
    No wildcard imports allowed. The standard for Brooklyn Java code is essentially the original Sun **Java Code Conventions** (from 1997) which you can also find at Oracle [here](http://www.oracle.com/technetwork/java/codeconventions-150003.pdf).


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974221
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    --- End diff --
    
    Sensor names should be of the form `riak.node.fsm_time.mean` and should indicate in the description what the units are (milliseconds, perhaps?)


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26973882
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeImpl.java ---
    @@ -161,8 +162,15 @@ public void connectSensors() {
                                         }
                                     }
                             ))
    -                        .onFailureOrException(Functions.constant(Arrays.asList(new String[0]))))
    -                .build();
    +                        .onFailureOrException(Functions.constant(Arrays.asList(new String[0]))));
    +
    +        for(AttributeSensor<String> sensor : ONE_MINUTE_STRING_SENSORS) {
    --- End diff --
    
    Should be a space after `for` and before `(`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by bostko <gi...@git.apache.org>.
Github user bostko commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85182918
  
    @grkvlt I put only `riak.` prefix since several of the parameters already has the word node in their names.
    Is that OK?


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974549
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    --- End diff --
    
    This one should be `riak.node.merge_time.object_counter.mean`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26973839
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    +    AttributeSensor<String> SEARCH_INDEX_LATENCY_MEDIAN = Sensors.newStringSensor("search_index_latency_median", "Time it takes Search to index a new document");
    +    AttributeSensor<String> CONSISTENT_GET_TIME_MEAN = Sensors.newStringSensor("consistent_get_time_mean", "Strongly consistent read latency");
    +    AttributeSensor<String> CONSISTENT_PUT_TIME_MEAN = Sensors.newStringSensor("consistent_put_time_mean", "Strongly consistent write latency");
    +
    +    List<AttributeSensor<String>> ONE_MINUTE_STRING_SENSORS = ImmutableList.of(NODE_GET_FSM_TIME_MEAN, NODE_PUT_FSM_TIME_MEAN,
    +            OBJECT_COUNTER_MERGE_TIME_MEAN, OBJECT_SET_MERGE_TIME_MEAN, OBJECT_MAP_MERGE_TIME_MEAN,
    +            SEARCH_QUERY_LATENCY_MEDIAN, SEARCH_INDEX_LATENCY_MEDIAN,
    +            CONSISTENT_GET_TIME_MEAN, CONSISTENT_PUT_TIME_MEAN);
    +
    +    ConfigKey<Boolean> DO_OS_TUNING = new BasicConfigKey<Boolean>(
    +            Boolean.class,
    +            "do.os.tunning",
    --- End diff --
    
    Also, this is not a good configuration key name, they should be prefixed `riak.` for this entity


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by bostko <gi...@git.apache.org>.
Github user bostko commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85517428
  
    Wait for me to test it. There is a problem related with renaming the config parameters.


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974520
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    --- End diff --
    
    This one should be `riak.node.merge_time.object_map.mean`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974812
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    +    AttributeSensor<String> SEARCH_INDEX_LATENCY_MEDIAN = Sensors.newStringSensor("search_index_latency_median", "Time it takes Search to index a new document");
    +    AttributeSensor<String> CONSISTENT_GET_TIME_MEAN = Sensors.newStringSensor("consistent_get_time_mean", "Strongly consistent read latency");
    +    AttributeSensor<String> CONSISTENT_PUT_TIME_MEAN = Sensors.newStringSensor("consistent_put_time_mean", "Strongly consistent write latency");
    --- End diff --
    
    This one should be `riak.node.time.consistent_put.mean`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974794
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    +    AttributeSensor<String> SEARCH_INDEX_LATENCY_MEDIAN = Sensors.newStringSensor("search_index_latency_median", "Time it takes Search to index a new document");
    +    AttributeSensor<String> CONSISTENT_GET_TIME_MEAN = Sensors.newStringSensor("consistent_get_time_mean", "Strongly consistent read latency");
    --- End diff --
    
    This one should be `riak.node.time.consistent_get.mean`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/565


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85178022
  
    I understand why the sensors have the names they were given, but it would still be possible to generate the JSON parsing code in the `HttpFeed` if they had a `riak.node.` prefix. You should also be able to either parse or cast the reult to an integer representing the time.


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974744
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    +    AttributeSensor<String> SEARCH_INDEX_LATENCY_MEDIAN = Sensors.newStringSensor("search_index_latency_median", "Time it takes Search to index a new document");
    --- End diff --
    
    This one should be `riak.node.latency.search_index.median`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974308
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    +    AttributeSensor<String> OBJECT_MAP_MERGE_TIME_MEAN = Sensors.newStringSensor("object_map_merge_time_mean", "Time it takes to perform an Update Map operation");
    +    AttributeSensor<String> SEARCH_QUERY_LATENCY_MEDIAN = Sensors.newStringSensor("search_query_latency_median", "Search query latency");
    --- End diff --
    
    This one should be `riak.node.searchQueryLatency.median` for example


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85269247
  
    So, if you fix the imports I'm happy merging this now.


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974499
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    +    AttributeSensor<String> OBJECT_COUNTER_MERGE_TIME_MEAN = Sensors.newStringSensor("object_counter_merge_time_mean", "Time it takes to perform an Update Counter operation");
    +    AttributeSensor<String> OBJECT_SET_MERGE_TIME_MEAN = Sensors.newStringSensor("object_set_merge_time_mean", "Time it takes to perform an Update Set operation");
    --- End diff --
    
    This one should be `riak.node.merge_time.object_set.mean`


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#issuecomment-85516063
  
    Build failure is due to lack of license in files added by 89b621b1b2eeabc631cea77f10e9ad626ee072d6 so can be ignored - the tests are still passing in the `software/nosql` project


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974110
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeImpl.java ---
    @@ -161,8 +162,15 @@ public void connectSensors() {
                                         }
                                     }
                             ))
    -                        .onFailureOrException(Functions.constant(Arrays.asList(new String[0]))))
    -                .build();
    +                        .onFailureOrException(Functions.constant(Arrays.asList(new String[0]))));
    +
    +        for(AttributeSensor<String> sensor : ONE_MINUTE_STRING_SENSORS) {
    +            httpFeedBuilder.poll(new HttpPollConfig<String>(sensor)
    +                    .onSuccess(HttpValueFunctions.jsonContents(sensor.getName(), String.class))
    +                    .onFailureOrException(Functions.constant("-1")));
    --- End diff --
    
    Why are we returning a string with a number in it? If these are numeric sensors, then parse the results with `Integer#valueOf(String)` or similar, so they can be used in policies.


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

[GitHub] incubator-brooklyn pull request: Riak - More statistics

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/565#discussion_r26974422
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNode.java ---
    @@ -142,6 +140,27 @@
         MethodEffector<Void> LEAVE_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "leaveCluster");
         MethodEffector<Void> COMMIT_RIAK_CLUSTER = new MethodEffector<Void>(RiakNode.class, "commitCluster");
     
    +    AttributeSensor<String> NODE_GET_FSM_TIME_MEAN = Sensors.newStringSensor("node_get_fsm_time_mean", "Time between reception of client read request and subsequent response to client");
    +    AttributeSensor<String> NODE_PUT_FSM_TIME_MEAN = Sensors.newStringSensor("node_put_fsm_time_mean", "Time between reception of client write request and subsequent response to client");
    --- End diff --
    
    This one should be  `riak.node.fsm_time.put.mean`


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