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 06F3E200C24 for ; Thu, 23 Feb 2017 20:48:33 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 05970160B64; Thu, 23 Feb 2017 19:48:33 +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 4109B160B3E for ; Thu, 23 Feb 2017 20:48:32 +0100 (CET) Received: (qmail 13942 invoked by uid 500); 23 Feb 2017 19:48:31 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 13926 invoked by uid 99); 23 Feb 2017 19:48:31 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 19:48:31 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0E62FDFDB1; Thu, 23 Feb 2017 19:48:31 +0000 (UTC) From: ctubbsii To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #220: ACCUMULO-4591 replication latency metrics added Content-Type: text/plain Message-Id: <20170223194831.0E62FDFDB1@git1-us-west.apache.org> Date: Thu, 23 Feb 2017 19:48:31 +0000 (UTC) archived-at: Thu, 23 Feb 2017 19:48:33 -0000 Github user ctubbsii commented on a diff in the pull request: https://github.com/apache/accumulo/pull/220#discussion_r102801369 --- Diff: server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java --- @@ -216,4 +220,13 @@ protected long removeRowIfNecessary(BatchWriter bw, SortedMap columns return recordsRemoved; } + + /* + * Metrics calls snapshot. Largest time stamp will be found for each snapshot then reset. + */ + private void collectLatency(Long createdTime) { + long latency = System.currentTimeMillis() - createdTime; --- End diff -- Definitely don't use nanoTime across processes. It's only guaranteed that `(newtime - oldtime) > 0` within the same process. --- 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. ---