From issues-return-153407-archive-asf-public=cust-asf.ponee.io@flink.apache.org Fri Feb 16 12:50:43 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F0ACD180647 for ; Fri, 16 Feb 2018 12:50:42 +0100 (CET) Received: (qmail 9636 invoked by uid 500); 16 Feb 2018 11:50:42 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 9627 invoked by uid 99); 16 Feb 2018 11:50:42 -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; Fri, 16 Feb 2018 11:50:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 04CD4DFE46; Fri, 16 Feb 2018 11:50:40 +0000 (UTC) From: zentol To: issues@flink.apache.org Reply-To: issues@flink.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request #5504: [FLINK-8670] Make MetricRegistryImpl#shutdown non ... Content-Type: text/plain Message-Id: <20180216115041.04CD4DFE46@git1-us-west.apache.org> Date: Fri, 16 Feb 2018 11:50:40 +0000 (UTC) Github user zentol commented on a diff in the pull request: https://github.com/apache/flink/pull/5504#discussion_r168737362 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/metrics/MetricRegistryImpl.java --- @@ -226,71 +235,72 @@ public int getNumberReporters() { */ public boolean isShutdown() { synchronized (lock) { - return reporters == null && executor.isShutdown(); + return isShutdown; } } /** * Shuts down this registry and the associated {@link MetricReporter}. + * + *

NOTE: This operation is asynchronous and returns a future which is completed + * once the shutdown operation has been completed. + * + * @return Future which is completed once the {@link MetricRegistryImpl} + * is shut down. */ - public void shutdown() { + public CompletableFuture shutdown() { --- End diff -- Fair point. What about the renaming though? ---