Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 843FA200BEA for ; Tue, 27 Dec 2016 18:33:47 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 82D3D160B31; Tue, 27 Dec 2016 17:33:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id CBFEB160B1D for ; Tue, 27 Dec 2016 18:33:46 +0100 (CET) Received: (qmail 88892 invoked by uid 500); 27 Dec 2016 17:33:46 -0000 Mailing-List: contact reviews-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.apache.org Delivered-To: mailing list reviews@aurora.apache.org Received: (qmail 88863 invoked by uid 99); 27 Dec 2016 17:33:45 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2016 17:33:45 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id BD1D430FCBC; Tue, 27 Dec 2016 17:33:44 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7865945024459084117==" MIME-Version: 1.0 Subject: Re: Review Request 54624: Expose stats on ZooKeeper connection state From: Joshua Cohen To: Joshua Cohen , Stephan Erb , Mehrdad Nurolahzade , Zameer Manji Cc: Aurora , Jing Chen Date: Tue, 27 Dec 2016 17:33:44 -0000 Message-ID: <20161227173344.1483.88121@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Joshua Cohen X-ReviewGroup: Aurora X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/54624/ X-Sender: Joshua Cohen X-ReviewBoard-ShipIt: 1 References: <20161220093328.1708.47591@reviews.apache.org> In-Reply-To: <20161220093328.1708.47591@reviews.apache.org> Reply-To: Joshua Cohen X-ReviewRequest-Repository: aurora archived-at: Tue, 27 Dec 2016 17:33:47 -0000 --===============7865945024459084117== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- 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) 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 > > --===============7865945024459084117==--