----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/#review160175 -----------------------------------------------------------
Fix it, then Ship it! lgtm modulo the below. src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java (lines 68 - 77) <https://reviews.apache.org/r/54624/#comment231247> 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. - Joshua Cohen 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 > >
