You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Jing Chen <mi...@gmail.com> on 2017/01/04 07:24:17 UTC

Re: Review Request 54624: Expose stats on ZooKeeper connection state


> On Dec. 27, 2016, 5:33 p.m., Joshua Cohen wrote:
> > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java, lines 68-77
> > <https://reviews.apache.org/r/54624/diff/3/?file=1589427#file1589427line68>
> >
> >     It's prefereble to inject the `StatsProvider` instance and use that to create the counters in the constructor rather than to reference `Stats.STATS_PROVIDER` directly (if we ever bound another instance of `StatsProvider` in `AppModule` this class would not be aware of that, nor would we be able to use a mock stats provider for tests if we so desired.

is it a good idea to inject `StatsProvider` to the constructor in this case? Would it be better if `StatsProvide` were injected into provides methods and initializes counters?


- Jing


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54624/#review160175
-----------------------------------------------------------


On Dec. 20, 2016, 9:33 a.m., Jing Chen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54624/
> -----------------------------------------------------------
> 
> (Updated Dec. 20, 2016, 9:33 a.m.)
> 
> 
> Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji.
> 
> 
> Bugs: AURORA-1838
>     https://issues.apache.org/jira/browse/AURORA-1838
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Expose stats on ZooKeeper connection state
> 
> 
> Diffs
> -----
> 
>   src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 
> 
> Diff: https://reviews.apache.org/r/54624/diff/
> 
> 
> Testing
> -------
> 
> http://192.168.33.7:8081/vars
> ```
> zk_connection_state_CONNECTED 1
> zk_connection_state_CONNECTED_counter 1
> zk_connection_state_LOST 0
> zk_connection_state_LOST_counter 0
> zk_connection_state_READ_ONLY 0
> zk_connection_state_READ_ONLY_counter 0
> zk_connection_state_RECONNECTED 0
> zk_connection_state_RECONNECTED_counter 0
> zk_connection_state_SUSPENDED 0
> zk_connection_state_SUSPENDED_counter 0
> ```
> 
> * zk_connection_state_STATE shows 1 if STATE is current connection state, otherwise 0.
> * zk_connection_state_STATE_counter represents occurence times of the STATE since scheduler state
> 
> 
> Thanks,
> 
> Jing Chen
> 
>