From commits-return-11324-archive-asf-public=cust-asf.ponee.io@hudi.apache.org Mon Feb 10 07:14:07 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2705918062B for ; Mon, 10 Feb 2020 08:14:07 +0100 (CET) Received: (qmail 62846 invoked by uid 500); 10 Feb 2020 07:14:06 -0000 Mailing-List: contact commits-help@hudi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hudi.apache.org Delivered-To: mailing list commits@hudi.apache.org Received: (qmail 62837 invoked by uid 99); 10 Feb 2020 07:14:06 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Feb 2020 07:14:06 +0000 From: GitBox To: commits@hudi.apache.org Subject: [GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1106: [HUDI-209] Implement JMX metrics reporter Message-ID: <158131884631.32612.1588988158533308385.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Mon, 10 Feb 2020 07:14:06 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit vinothchandar commented on a change in pull request #1106: [HUDI-209] Implement JMX metrics reporter URL: https://github.com/apache/incubator-hudi/pull/1106#discussion_r376895998 ########## File path: hudi-client/src/main/java/org/apache/hudi/metrics/JmxMetricsReporter.java ########## @@ -82,6 +102,106 @@ public void report() { @Override public Closeable getReporter() { - return null; + return jmxServer.getReporter(); + } + + @Override + public void stop() { + if (jmxServer != null) { + try { + jmxServer.stop(); + } catch (IOException e) { + LOG.error("Failed to stop JMX server.", e); + } + } + } + + /** + * JMX Server implementation that JMX clients can connect to. + * + *

Heavily based on j256 simplejmx project Review comment: apache and MIT are what we can clear easily. others need more scrutiny. Can we re-implement this ourselves please? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services