> On Dec. 12, 2016, 11:15 p.m., Mehrdad Nurolahzade wrote: > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java, > > lines 135-151 > > <https://reviews.apache.org/r/54624/diff/2/?file=1581612#file1581612line135> > > > > I would rather prefer binary state (0/1 value) to counter-like stats > > here. See `org.apache.aurora.scheduler.SchedulerLifecycle` as an example.
Binary state gauges have the disadvantage that they only show the presence. This would imply we need to scrape `/vars` pretty often in order to detect ZK connection problems. Counters don't have that limitation. - Stephan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/#review158871 ----------------------------------------------------------- On Dec. 12, 2016, 2:32 a.m., Jing Chen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54624/ > ----------------------------------------------------------- > > (Updated Dec. 12, 2016, 2:32 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_lost 0 > zk_connection_state_readonly 0 > zk_connection_state_reconnected 0 > zk_connection_state_suspended 0 > zk_connection_state_unknown 0 > ``` > > > Thanks, > > Jing Chen > >